Module: Monthify::CoreExt::Object
- Included in:
- Object
- Defined in:
- lib/monthify/core_ext/object.rb
Instance Method Summary collapse
-
#to_month ⇒ Month
Converts the object to a month.
Instance Method Details
#to_month ⇒ Month
Converts the object to a month. Uses the same logic as Kernel::Month(). Raises an ArgumentError if the object cannot be converted.
7 8 9 |
# File 'lib/monthify/core_ext/object.rb', line 7 def to_month ::Kernel::Month(self) end |