Module: HasHelpers::CoreExt::Date::Infinity
- Defined in:
- lib/has_helpers/core_ext/date/infinity.rb
Overview
This module should be prepended to Date::Infinity
e.g. Date::Infinity.prepend(HasHelpers::CoreExt::Date::Infinity)
Instance Method Summary collapse
-
#<=>(other) ⇒ Object
Adds comparison with the Date instance.
Instance Method Details
#<=>(other) ⇒ Object
Adds comparison with the Date instance.
13 14 15 16 17 18 19 |
# File 'lib/has_helpers/core_ext/date/infinity.rb', line 13 def <=>(other) case other when ::Date then d <=> 0 else super end end |