class Destruct::Hash
Public Instance Methods
[](key)
click to toggle source
Calls superclass method
# File lib/destruct/hash.rb 3 def [](key) 4 super(key) || super(key.to_s) || to_ary[key] 5 rescue TypeError 6 nil 7 end
[]=(key, value)
click to toggle source
Calls superclass method
# File lib/destruct/hash.rb 9 def []=(key, value) 10 to_ary << value 11 super 12 end
key?(key)
click to toggle source
Calls superclass method
# File lib/destruct/hash.rb 14 def key?(key) 15 super(key) || super(key.to_s) 16 end
to_ary()
click to toggle source
# File lib/destruct/hash.rb 18 def to_ary 19 @to_ary ||= values 20 end
Private Instance Methods
method_missing(method, *)
click to toggle source
Calls superclass method
# File lib/destruct/hash.rb 24 def method_missing(method, *) 25 key?(method) ? self[method] : super 26 end
respond_to_missing?(method, *)
click to toggle source
Calls superclass method
# File lib/destruct/hash.rb 28 def respond_to_missing?(method, *) 29 key?(method) || super 30 end