Class: Hash
- Inherits:
-
Object
- Object
- Hash
- Defined in:
- lib/support.rb
Overview
WithIndifferentAccess
Instance Method Summary collapse
Instance Method Details
#from_orient ⇒ Object
92 93 94 95 96 97 98 |
# File 'lib/support.rb', line 92 def from_orient substitute_hash = HashWithIndifferentAccess.new keys.each{ |k| puts self[k].inspect } keys.each{| k | substitute_hash[k] = self[k].from_orient } substitute_hash end |
#nested_under_indifferent_access ⇒ Object
106 107 108 |
# File 'lib/support.rb', line 106 def nested_under_indifferent_access HashWithIndifferentAccess.new self end |
#to_orient ⇒ Object
99 100 101 102 103 104 |
# File 'lib/support.rb', line 99 def to_orient substitute_hash = Hash.new keys.each{| k | substitute_hash[k] = self[k].to_orient } substitute_hash end |