Class: Daru::Offsets::Tick
Abstract
Overview
Private superclass for Offsets with equal inter-frequencies.
Instance Method Summary
collapse
#freq_string, #initialize
Methods inherited from DateOffset
#-@, #initialize
Instance Method Details
#+(date_time) ⇒ Object
107
108
109
|
# File 'lib/daru/date_time/offsets.rb', line 107
def + date_time
date_time + @n*multiplier
end
|
#-(date_time) ⇒ Object
111
112
113
|
# File 'lib/daru/date_time/offsets.rb', line 111
def - date_time
date_time - @n*multiplier
end
|
#==(other_obj) ⇒ Object
115
116
117
|
# File 'lib/daru/date_time/offsets.rb', line 115
def ==(other_obj)
other_obj.is_a?(Tick) && period == other_obj.period
end
|
119
120
121
|
# File 'lib/daru/date_time/offsets.rb', line 119
def period
@n * multiplier
end
|