Sha256: 5c98ef5a2c0a269ca6baaa9f05780f77a45b03e37f8db77e8296c0e53ce14b93

Contents?: true

Size: 208 Bytes

Versions: 30

Compression:

Stored size: 208 Bytes

Contents

class Hash
  def symbolize_keys!
    keys.each do |key|
      unless key.is_a?(Symbol) || (new_key = key.to_sym).nil?
        self[new_key] = self[key]
        delete(key)
      end
    end
    self
  end
end

Version data entries

30 entries across 30 versions & 11 rubygems

Version Path
DefV-juggernaut-0.5.7.2 lib/juggernaut/utils.rb
Flamefork-juggernaut-0.5.9 lib/juggernaut/utils.rb
dima-exe-juggernaut-0.5.9.1 lib/juggernaut/utils.rb
dima-exe-juggernaut-0.5.9.22 lib/juggernaut/utils.rb
dima-exe-juggernaut-0.5.9.23 lib/juggernaut/utils.rb
dima-exe-juggernaut-0.5.9.24 lib/juggernaut/utils.rb
dima-exe-juggernaut-0.5.9.25 lib/juggernaut/utils.rb
dima-exe-juggernaut-0.5.9.26 lib/juggernaut/utils.rb
dima-exe-juggernaut-0.5.9 lib/juggernaut/utils.rb
hubertlepicki-juggernaut-0.5.9 lib/juggernaut/utils.rb
maccman-juggernaut-0.5.9 lib/juggernaut/utils.rb
ripta-juggernaut-0.5.8 lib/juggernaut/utils.rb
tilleryj-juggernaut-0.5.9.1 lib/juggernaut/utils.rb
umka_juggernaut-0.0.1 lib/juggernaut/utils.rb
M4D-juggernaut-0.5.9.2 lib/juggernaut/utils.rb
M4D-juggernaut-0.5.9.1 lib/juggernaut/utils.rb
M4D-juggernaut-0.5.9 lib/juggernaut/utils.rb
juggernaut_rails-0.6.2 lib/juggernaut/utils.rb
juggernaut_rails-0.6.1 lib/juggernaut/utils.rb
juggernaut_rails-0.6.0 lib/juggernaut/utils.rb