class Hash
Public Instance Methods
check_for_presence(key)
click to toggle source
# File lib/dottedhash/hash.rb, line 16 def check_for_presence(key) !!get_value(key) end
get_value(key)
click to toggle source
# File lib/dottedhash/hash.rb, line 12 def get_value(key) self[key] end
method_missing(method, *args, &block)
click to toggle source
# File lib/dottedhash/hash.rb, line 2 def method_missing(method, *args, &block) method = method.to_s if method.end_with?("?") key = method[0..-2] check_for_presence(key) else get_value(method) end end