Class: Hecks::Bluebook::DSL::SettingsCollector
- Inherits:
-
Object
- Object
- Hecks::Bluebook::DSL::SettingsCollector
show all
- Defined in:
- lib/hecks/bluebook/dsl/world_builder.rb
Instance Method Summary
collapse
Constructor Details
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
12
|
# File 'lib/hecks/bluebook/dsl/world_builder.rb', line 12
def respond_to_missing?(_name, _include_private = false) = true
|
#to_h ⇒ Object
14
|
# File 'lib/hecks/bluebook/dsl/world_builder.rb', line 14
def to_h = @values
|