Method: Configurable::ConfigHash#to_hash
- Defined in:
- lib/configurable/config_hash.rb
#to_hash ⇒ Object
Returns self as a hash. Any ConfigHash values are recursively hashified, to account for nesting.
131 132 133 134 135 136 137 138 139 140 141 |
# File 'lib/configurable/config_hash.rb', line 131 def to_hash hash = {} each_pair do |key, value| if value.kind_of?(ConfigHash) value = value.to_hash end hash[key] = value end hash end |