Class: Hash

Inherits:
Object show all
Defined in:
lib/olelo/extensions.rb

Direct Known Subclasses

WithIndifferentAccess

Defined Under Namespace

Classes: WithIndifferentAccess

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.with_indifferent_access(arg = {}) ⇒ Object



138
139
140
# File 'lib/olelo/extensions.rb', line 138

def self.with_indifferent_access(arg = {})
  WithIndifferentAccess.new(arg)
end

Instance Method Details

#with_indifferent_accessObject



132
133
134
135
136
# File 'lib/olelo/extensions.rb', line 132

def with_indifferent_access
  hash = WithIndifferentAccess.new(self)
  hash.default = self.default
  hash
end