Guest User

Untitled

a guest
Jul 21st, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. require 'rubygems'
  2. require 'rubikon'
  3.  
  4. class ConfigSample < Rubikon::Application::Base
  5.  
  6. global_option :c => :config
  7. global_option :config, 'Override the configuration with the given file', :config_file do
  8. path = File.dirname config_file
  9. file = File.basename config_file
  10. config = Rubikon::Config::Factory.new(file, path).config
  11. @__app__.instance_eval { @config.merge! config }
  12. end
  13.  
  14. flag :'some-flag'
  15. option :'some-option', 1
  16.  
  17. command :start do
  18. p config
  19. end
  20.  
  21. end
Add Comment
Please, Sign In to add comment