Class: Daru::Offsets::DateOffsetType

Inherits:
DateOffset show all
Defined in:
lib/daru/date_time/offsets.rb

Direct Known Subclasses

MonthBegin, MonthEnd, Tick, YearBegin, YearEnd

Instance Method Summary collapse

Methods inherited from DateOffset

#+, #-, #-@

Constructor Details

#initialize(n = 1) ⇒ DateOffsetType

Returns a new instance of DateOffsetType.



85
86
87
# File 'lib/daru/date_time/offsets.rb', line 85

def initialize n=1
  @n = n
end

Instance Method Details

#freq_stringObject



89
90
91
# File 'lib/daru/date_time/offsets.rb', line 89

def freq_string
  (@n == 1 ? '' : @n.to_s) + self.class::FREQ
end