Method: TZInfo::DateTimeWithOffset#downto
- Defined in:
- lib/tzinfo/datetime_with_offset.rb
#downto(min) ⇒ Object
An overridden version of DateTime#downto
that clears the associated
TimezoneOffset of the returned or yielded instances.
61 62 63 64 65 66 67 68 69 |
# File 'lib/tzinfo/datetime_with_offset.rb', line 61 def downto(min) if block_given? super {|dt| yield dt.clear_timezone_offset } else enum = super enum.each {|dt| dt.clear_timezone_offset } enum end end |