Class: Hash

Inherits:
Object
  • Object
show all
Defined in:
waxx/patch.rb

Instance Method Summary collapse

Instance Method Details

#/(k) ⇒ Object

Add an symbol/string indifferent access to a hash



52
53
54
55
# File 'waxx/patch.rb', line 52

def /(k)
  return self[k.to_sym] if self.has_key?(k.to_sym)
  self[k.to_s]
end