Class: Daru::Offsets::DateOffsetType
- Inherits:
-
DateOffset
- Object
- DateOffset
- Daru::Offsets::DateOffsetType
- Defined in:
- lib/daru/date_time/offsets.rb
Direct Known Subclasses
Instance Method Summary collapse
- #freq_string ⇒ Object
-
#initialize(n) ⇒ DateOffsetType
constructor
Initialize one of the subclasses of DateOffsetType with the number of the times the offset should be applied, which is the supplied as the argument.
Methods inherited from DateOffset
Constructor Details
#initialize(n) ⇒ DateOffsetType
Initialize one of the subclasses of DateOffsetType with the number of the times the offset should be applied, which is the supplied as the argument.
94 95 96 |
# File 'lib/daru/date_time/offsets.rb', line 94 def initialize n=1 @n = n end |
Instance Method Details
#freq_string ⇒ Object
98 99 100 |
# File 'lib/daru/date_time/offsets.rb', line 98 def freq_string (@n == 1 ? '' : @n.to_s) + self.class::FREQ end |