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