Class: Hash
- Inherits:
-
Object
- Object
- Hash
- Defined in:
- lib/edge_cast/core_ext/hash.rb
Instance Method Summary collapse
Instance Method Details
#to_api! ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/edge_cast/core_ext/hash.rb', line 11 def to_api! keys.each do |key| value = delete(key) self[key.to_s.camelize] = value.respond_to?(:to_api!) ? value.to_api! : value end self end |
#to_result! ⇒ Object
3 4 5 6 7 8 9 |
# File 'lib/edge_cast/core_ext/hash.rb', line 3 def to_result! keys.each do |key| value = delete(key) self[key.to_s.underscore.to_sym] = value.respond_to?(:to_result!) ? value.to_result! : value end self end |