Class: Hash

Inherits:
Object show all
Defined in:
lib/perennial/core_ext/blank.rb,
lib/perennial/nash.rb,
lib/perennial/core_ext/hash_key_conversions.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#stringify_keysObject



16
17
18
19
20
# File 'lib/perennial/core_ext/hash_key_conversions.rb', line 16

def stringify_keys
  hash = self.dup
  hash.stringify_keys!
  return hash
end

#stringify_keys!Object



12
13
14
# File 'lib/perennial/core_ext/hash_key_conversions.rb', line 12

def stringify_keys!
  convert_keys_via :to_s
end

#symbolize_keysObject



2
3
4
5
6
# File 'lib/perennial/core_ext/hash_key_conversions.rb', line 2

def symbolize_keys
  hash = self.dup
  hash.symbolize_keys!
  return hash
end

#symbolize_keys!Object



8
9
10
# File 'lib/perennial/core_ext/hash_key_conversions.rb', line 8

def symbolize_keys!
  convert_keys_via :to_sym
end

#to_nashObject



225
226
227
# File 'lib/perennial/nash.rb', line 225

def to_nash
  Perennial::Nash.new(self)
end