Class: Hash
Instance Method Summary (collapse)
-
- (Object) convert_hash_keys_to_methods(fixture)
:nodoc:.
-
- (Object) key_strings_to_symbols!
Recursively replace key names that should be symbols with symbols.
Instance Method Details
- (Object) convert_hash_keys_to_methods(fixture)
:nodoc:
2 3 4 |
# File 'lib/extensions/hash.rb', line 2 def convert_hash_keys_to_methods(fixture) # :nodoc: Taza::Entity.new(self,fixture) end |
- (Object) key_strings_to_symbols!
Recursively replace key names that should be symbols with symbols.
7 8 9 10 11 12 13 14 |
# File 'lib/extensions/hash.rb', line 7 def key_strings_to_symbols! result = Hash.new self.each_pair do |key,value| value.key_strings_to_symbols! if value.kind_of? Hash and value.respond_to? :key_strings_to_symbols! result[key.to_sym] = value end self.replace(result) end |