Module: Rapnd::Config
Instance Method Summary collapse
Instance Method Details
#defaults ⇒ Object
23 24 25 |
# File 'lib/rapnd/config.rb', line 23 def defaults @defaults ||= {} end |
#option(name, options = {}) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/rapnd/config.rb', line 5 def option(name, = {}) defaults[name] = settings[name] = [:default] class_eval <<-RUBY def #{name} settings[#{name.inspect}] end def #{name}=(value) settings[#{name.inspect}] = value end def #{name}? #{name} end RUBY end |
#settings ⇒ Object
27 28 29 |
# File 'lib/rapnd/config.rb', line 27 def settings @settings ||= {} end |