Class: Hecks::Bluebook::DSL::SettingsCollector

Inherits:
Object
  • Object
show all
Defined in:
lib/hecks/bluebook/dsl/world_builder.rb

Instance Method Summary collapse

Constructor Details

#initializeSettingsCollector

Returns a new instance of SettingsCollector.



6
# File 'lib/hecks/bluebook/dsl/world_builder.rb', line 6

def initialize = @values = {}

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(key, *args, &_block) ⇒ Object



8
9
10
# File 'lib/hecks/bluebook/dsl/world_builder.rb', line 8

def method_missing(key, *args, &_block)
  @values[key.to_sym] = args.size == 1 ? args.first : args
end

Instance Method Details

#respond_to_missing?(_name, _include_private = false) ⇒ Boolean

Returns:

  • (Boolean)


12
# File 'lib/hecks/bluebook/dsl/world_builder.rb', line 12

def respond_to_missing?(_name, _include_private = false) = true

#to_hObject



14
# File 'lib/hecks/bluebook/dsl/world_builder.rb', line 14

def to_h = @values