Class: Hash
- Inherits:
-
Object
- Object
- Hash
- Defined in:
- lib/other.rb
Overview
WithIndifferentAccess
Instance Method Summary collapse
Instance Method Details
#from_orient ⇒ Object
123 124 125 126 127 128 |
# File 'lib/other.rb', line 123 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
137 138 139 |
# File 'lib/other.rb', line 137 def nested_under_indifferent_access HashWithIndifferentAccess.new self end |
#to_orient ⇒ Object
130 131 132 133 134 135 |
# File 'lib/other.rb', line 130 def to_orient #puts "here hash" substitute_hash = Hash.new keys.each{|k| substitute_hash[k] = self[k].to_orient} substitute_hash end |