Class: Months
Direct Known Subclasses
Constant Summary
Constants inherited from Duration
Duration::MULTIPLES, Duration::UNITS, Duration::VERSION
Instance Attribute Summary
Attributes inherited from Duration
#days, #hours, #minutes, #months, #seconds, #total, #weeks, #years
Instance Method Summary collapse
-
#initialize(number = 1) ⇒ Months
constructor
A new instance of Months.
Methods inherited from Duration
#%, #*, #+, #-, #/, #<=>, #blank?, #format, #iso8601, #present?
Constructor Details
#initialize(number = 1) ⇒ Months
Returns a new instance of Months.
2 3 4 |
# File 'lib/duration/time_units/month.rb', line 2 def initialize number = 1 super(:months => number) end |