Class: MonthRange::Month::Infinity
- Inherits:
-
Numeric
- Object
- Numeric
- MonthRange::Month::Infinity
- Defined in:
- lib/month_range/month.rb
Instance Method Summary collapse
- #<=(other) ⇒ Object
- #<=>(other) ⇒ Object
- #==(other) ⇒ Object
- #>=(other) ⇒ Object
- #infinite? ⇒ Boolean
- #to_date ⇒ Object
- #to_f ⇒ Object
Instance Method Details
#<=(other) ⇒ Object
31 32 33 |
# File 'lib/month_range/month.rb', line 31 def <=(other) other.infinite? end |
#<=>(other) ⇒ Object
47 48 49 50 51 52 53 54 55 |
# File 'lib/month_range/month.rb', line 47 def <=>(other) case other when Infinity return 1 when MonthRange::Month return 1 end nil end |
#==(other) ⇒ Object
39 40 41 |
# File 'lib/month_range/month.rb', line 39 def ==(other) other.infinite? end |
#>=(other) ⇒ Object
35 36 37 |
# File 'lib/month_range/month.rb', line 35 def >=(other) other.infinite? ? true : other.is_a?(MonthRange::Month) end |
#infinite? ⇒ Boolean
27 28 29 |
# File 'lib/month_range/month.rb', line 27 def infinite? true end |
#to_date ⇒ Object
43 44 45 |
# File 'lib/month_range/month.rb', line 43 def to_date nil end |
#to_f ⇒ Object
57 58 59 |
# File 'lib/month_range/month.rb', line 57 def to_f Float::INFINITY end |