instance method
respond_to?
Ruby on Rails 5.2.8.1
Since v2.2.3Signature
respond_to?(sym, include_priv = false)
respond_to_missing? is not called in some cases, such as when type conversion is performed with Kernel#String
Parameters
-
symreq -
include_privopt = false
Source
# File activesupport/lib/active_support/time_with_zone.rb, line 495
def respond_to?(sym, include_priv = false)
# ensure that we're not going to throw and rescue from NoMethodError in method_missing which is slow
return false if sym.to_sym == :to_str
super
end
Defined in activesupport/lib/active_support/time_with_zone.rb line 495
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveSupport::TimeWithZone