Class: TorqueBox::Configuration::ThingWithOptionsEntry

Inherits:
Entry
  • Object
show all
Defined in:
lib/torquebox/configuration.rb

Instance Method Summary collapse

Methods inherited from Entry

#add_options, const_missing, #eval_block, #find_line_number, #initialize, #local_config, #local_config=, #method_missing, #process, #validate_options, with_settings

Constructor Details

This class inherits a constructor from TorqueBox::Configuration::Entry

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class TorqueBox::Configuration::Entry

Instance Method Details

#finalize_optionsObject



150
151
152
153
154
155
156
157
# File 'lib/torquebox/configuration.rb', line 150

def finalize_options
  if @options[:discrete]
    local_config << [@thing.to_s, @entry_options]
  else
    local_config[@thing.to_s] = { } unless local_config[@thing.to_s]
    @entry_options = local_config[@thing.to_s].merge!( @entry_options )
  end
end

#process_args(args) ⇒ Object



145
146
147
148
# File 'lib/torquebox/configuration.rb', line 145

def process_args(args)
  @thing, hash = args
  add_options( hash || {} )
end