Method: Eye::Dsl::PureOpts#initialize
- Defined in:
- lib/eye/dsl/pure_opts.rb
#initialize(name = nil, parent = nil, merge_parent_config = true) ⇒ PureOpts
Returns a new instance of PureOpts.
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 |
# File 'lib/eye/dsl/pure_opts.rb', line 46 def initialize(name = nil, parent = nil, merge_parent_config = true) @name = name.to_s @full_name = @name if parent @parent = parent if merge_parent_config @config = Eye::Utils.deep_clone(parent.config) parent..each { |opt| @config.delete(opt) } else @config = {} end @full_name = "#{parent.full_name}:#{@full_name}" else @config = {} end @config[:name] = @name if @name.present? end |