Sha256: d9688768c5529749620bcdeb5c2879b1623a4029cf8bb04bce647b85d7baf5a2

Contents?: true

Size: 494 Bytes

Versions: 9

Compression:

Stored size: 494 Bytes

Contents

class Hash
  def recursively_symbolize_keys!
    self.symbolize_keys!
    self.values.each do |v|
      if v.is_a? Hash
        v.recursively_symbolize_keys!
      elsif v.is_a? Array
        v.recursively_symbolize_keys!
      end
    end
    self
  end
end

class Array
  def recursively_symbolize_keys!
    self.each do |item|
      if item.is_a? Hash
        item.recursively_symbolize_keys!
      elsif item.is_a? Array
        item.recursively_symbolize_keys!
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
compressible-0.0.3 lib/ext.rb
compressible-0.0.2.6 lib/ext.rb
cockpit-0.0.1.7 lib/cockpit/extensions.rb
cockpit-0.0.1.5 lib/cockpit/extensions.rb
compressible-0.0.2.4 lib/ext.rb
compressible-0.0.2.3 lib/ext.rb
compressible-0.0.2.2 lib/ext.rb
compressible-0.0.2.1 lib/ext.rb
compressible-0.0.2 lib/ext.rb