module Normalize
Namespace and Wrapper that fetch JSON objects from Emergency Number API @since 0.1.0
Public Instance Methods
method_missing(sym, *)
click to toggle source
Return values from hash object by looking up keys from {EmergencyNumber.get_country}. Called when using dot notation on a hash object.
@overload method_missing
(sym, value)
@param [Symbol] sym key in the hash object. @param [Object] * multiple number of args.
@return [Object] value the respective hash key points to.
Calls superclass method
# File lib/normalize.rb, line 12 def method_missing(sym, *) r = fetch(sym) { fetch(sym.to_s) { super } } r.is_a?(Hash) ? r.extend(Normalize) : r end