Module: PoolParty::Configurable::InstanceMethods
- Defined in:
- lib/poolparty/modules/configurable.rb
Instance Method Summary collapse
- #configure(h = {}) ⇒ Object
- #options(h = {}) ⇒ Object
- #reconfigure(h = {}) ⇒ Object
- #set_vars_from_options(opts = {}) ⇒ Object
Instance Method Details
#configure(h = {}) ⇒ Object
14 15 16 |
# File 'lib/poolparty/modules/configurable.rb', line 14 def configure(h={}) (h).merge!(h) end |
#options(h = {}) ⇒ Object
10 11 12 |
# File 'lib/poolparty/modules/configurable.rb', line 10 def (h={}) @options ||= self.class..merge(h) end |
#reconfigure(h = {}) ⇒ Object
18 19 20 21 |
# File 'lib/poolparty/modules/configurable.rb', line 18 def reconfigure(h={}) @options = nil (h) end |
#set_vars_from_options(opts = {}) ⇒ Object
23 24 25 |
# File 'lib/poolparty/modules/configurable.rb', line 23 def (opts={}) opts.each {|k,v| self.send k.to_sym, v } unless opts.empty? end |