Class: DaruLite::Offsets::DateOffsetType
- Inherits:
-
DateOffset
- Object
- DateOffset
- DaruLite::Offsets::DateOffsetType
- Defined in:
- lib/daru_lite/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.
92 93 94 |
# File 'lib/daru_lite/date_time/offsets.rb', line 92 def initialize(n = 1) @n = n end |
Instance Method Details
#freq_string ⇒ Object
96 97 98 |
# File 'lib/daru_lite/date_time/offsets.rb', line 96 def freq_string (@n == 1 ? '' : @n.to_s) + self.class::FREQ end |