method
method_missing
v5.1.7 -
Show latest stable
- Class:
ActiveSupport::OrderedOptions
method_missing(name, *args)public
No documentation available.
# File activesupport/lib/active_support/ordered_options.rb, line 39
def method_missing(name, *args)
name_string = name.to_s
if name_string.chomp!("=")
self[name_string] = args.first
else
bangs = name_string.chomp!("!")
if bangs
fetch(name_string.to_sym).presence || raise(KeyError.new("#{name_string} is blank."))
else
self[name_string]
end
end
end