Class: Hash
- Inherits:
-
Object
- Object
- Hash
- Defined in:
- lib/other.rb
Overview
WithIndifferentAccess
Instance Method Summary collapse
Instance Method Details
#from_orient ⇒ Object
159 160 161 162 163 164 |
# File 'lib/other.rb', line 159 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
173 174 175 |
# File 'lib/other.rb', line 173 def nested_under_indifferent_access HashWithIndifferentAccess.new self end |
#to_orient ⇒ Object
166 167 168 169 170 171 |
# File 'lib/other.rb', line 166 def to_orient #puts "here hash" substitute_hash = Hash.new keys.each{|k| substitute_hash[k] = self[k].to_orient} substitute_hash end |