Module: TimePatch
- Defined in:
- lib/dynamic_time_zone/time_patch.rb
Instance Method Summary collapse
- #compare_with_coercion(other) ⇒ Object (also: #<=>)
Instance Method Details
#compare_with_coercion(other) ⇒ Object Also known as: <=>
4 5 6 7 8 9 10 |
# File 'lib/dynamic_time_zone/time_patch.rb', line 4 def compare_with_coercion(other) if DynamicTimeZone.enabled && other.is_a?(ActiveSupport::TimeWithZone) && other.using_dynamic_time_zone? self.utc <=> other.utc else super end end |