Class: PinballWizard::DSL::Builder

Inherits:
Object
  • Object
show all
Defined in:
lib/pinball_wizard/dsl.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(config) ⇒ Builder

Returns a new instance of Builder.



14
15
16
# File 'lib/pinball_wizard/dsl.rb', line 14

def initialize(config)
  @config = config
end

Instance Attribute Details

#configObject (readonly)

Returns the value of attribute config.



12
13
14
# File 'lib/pinball_wizard/dsl.rb', line 12

def config
  @config
end

Instance Method Details

#feature(name, *options) ⇒ Object



18
19
20
21
22
# File 'lib/pinball_wizard/dsl.rb', line 18

def feature(name, *options)
  options = Helpers::Hash.normalize_options(options)
  feature = build_feature(name, options)
  Registry.add(feature)
end