instance method
method_missing
Ruby on Rails 3.0.20
Since v2.2.3Signature
method_missing(sym, *args, &block)
Send the missing method to time instance, and wrap result in a new TimeWithZone with the existing time_zone.
Parameters
-
symreq -
argsrest -
blockblock
Source
# File activesupport/lib/active_support/time_with_zone.rb, line 321
def method_missing(sym, *args, &block)
result = time.__send__(sym, *args, &block)
result.acts_like?(:time) ? self.class.new(nil, time_zone, result) : result
end
Defined in activesupport/lib/active_support/time_with_zone.rb line 321
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveSupport::TimeWithZone