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



135
136
137
# File 'lib/olelo/extensions.rb', line 135

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

Instance Method Details

#with_indifferent_accessObject



129
130
131
132
133
# File 'lib/olelo/extensions.rb', line 129

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