Sha256: a6a372cab7fab01f9d183948c6a7e2f348bd7e85cfce190929a74780c231f9e4

Contents?: true

Size: 446 Bytes

Versions: 12

Compression:

Stored size: 446 Bytes

Contents

class Hash
  def convert_hash_keys_to_methods(fixture) # :nodoc:
    Taza::Entity.new(self,fixture)
  end

  # Recursively replace key names that should be symbols with symbols.
  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
end

Version data entries

12 entries across 12 versions & 3 rubygems

Version Path
taza-2.1.0 lib/extensions/hash.rb
taza-2.0 lib/extensions/hash.rb
taza-1.0 lib/extensions/hash.rb
makevoid-taza-0.8.6 lib/extensions/hash.rb
scudco-taza-0.8.7 lib/extensions/hash.rb
taza-0.9.2.1 lib/extensions/hash.rb
taza-0.9.2.0 lib/extensions/hash.rb
taza-0.9.1.2 lib/extensions/hash.rb
taza-0.9.1.1 lib/extensions/hash.rb
taza-0.9.1 lib/extensions/hash.rb
taza-0.9.0 lib/extensions/hash.rb
taza-0.8.7 lib/extensions/hash.rb