Class: Eye::Dsl::ApplicationOpts
- Includes:
- Chain
- Defined in:
- lib/eye/dsl/application_opts.rb
Constant Summary
Constants inherited from Opts
Opts::BOOL_OPTIONS, Opts::INTERVAL_OPTIONS, Opts::STR_OPTIONS
Instance Attribute Summary
Attributes inherited from PureOpts
#config, #full_name, #name, #parent
Instance Method Summary collapse
- #disallow_options ⇒ Object
- #group(name, &block) ⇒ Object
- #not_seed_options ⇒ Object
- #process(name, &block) ⇒ Object
Methods included from Chain
Methods inherited from Opts
#checks, #clear_bundler_env, #daemonize!, #initialize, #nochecks, #nonotify, #notify, #notriggers, #scoped, #set_environment, #set_gid, #set_stdall, #set_uid, #triggers, #with_server
Methods inherited from PureOpts
#allow_options, create_options_methods, #initialize, #nop, #use, #with_condition
Constructor Details
This class inherits a constructor from Eye::Dsl::Opts
Instance Method Details
#disallow_options ⇒ Object
5 6 7 |
# File 'lib/eye/dsl/application_opts.rb', line 5 def [:pid_file, :start_command, :daemonize] end |
#group(name, &block) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/eye/dsl/application_opts.rb', line 13 def group(name, &block) Eye::Dsl.check_name(name) Eye::Dsl.debug "=> group #{name}" opts = Eye::Dsl::GroupOpts.new(name, self) opts.instance_eval(&block) @config[:groups] ||= {} @config[:groups][name.to_s] ||= {} if cfg = opts.config Eye::Utils.deep_merge!(@config[:groups][name.to_s], cfg) end Eye::Dsl.debug "<= group #{name}" opts end |
#not_seed_options ⇒ Object
9 10 11 |
# File 'lib/eye/dsl/application_opts.rb', line 9 def [:groups] end |
#process(name, &block) ⇒ Object
31 32 33 34 35 |
# File 'lib/eye/dsl/application_opts.rb', line 31 def process(name, &block) res = nil group('__default__'){ res = process(name.to_s, &block) } res end |