Method: FunWith::Configurations::ConfigAPI#from_hash
- Defined in:
- lib/fun_with/configurations/config_api.rb
#from_hash(hash) ⇒ Object
29 30 31 32 33 34 35 36 |
# File 'lib/fun_with/configurations/config_api.rb', line 29 def from_hash( hash ) (config = self.new).tap do for k, v in hash config.send( k, v.is_a?( Hash ) ? self.from_hash( v ) : v ) end end config end |