Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require 'rubygems'
- require 'rubikon'
- class ConfigSample < Rubikon::Application::Base
- global_option :c => :config
- global_option :config, 'Override the configuration with the given file', :config_file do
- path = File.dirname config_file
- file = File.basename config_file
- config = Rubikon::Config::Factory.new(file, path).config
- @__app__.instance_eval { @config.merge! config }
- end
- flag :'some-flag'
- option :'some-option', 1
- command :start do
- p config
- end
- end
Add Comment
Please, Sign In to add comment