instance method
method_missing
Ruby on Rails 7.1.6
Since v2.2.3Signature
method_missing(method, *args, &block)
Forward all undefined methods to the wrapped string.
Parameters
-
methodreq -
argsrest -
blockblock
Source
# File activesupport/lib/active_support/multibyte/chars.rb, line 62
def method_missing(method, *args, &block)
result = @wrapped_string.__send__(method, *args, &block)
if method.end_with?("!")
self if result
else
result.kind_of?(String) ? chars(result) : result
end
end
Defined in activesupport/lib/active_support/multibyte/chars.rb line 62
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveSupport::Multibyte::Chars