Module: F00px::Configuration::Options::ClassMethods
- Defined in:
- lib/f00px/configuration/options.rb
Instance Method Summary collapse
Instance Method Details
#defaults ⇒ Object
11 12 13 |
# File 'lib/f00px/configuration/options.rb', line 11 def defaults @defaults ||= {} end |
#option(name, options = {}) ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/f00px/configuration/options.rb', line 19 def option(name, = {}) self.defaults[name] = [:default] class_eval <<-RUBY def #{name} settings['#{name}'.to_sym] || #{self}.defaults['#{name}'.to_sym] end def #{name}=(value) settings['#{name}'.to_sym] = value end def #{name}? !!#{name} end RUBY end |
#options ⇒ Object
15 16 17 |
# File 'lib/f00px/configuration/options.rb', line 15 def self.defaults.keys end |