Class: DaruLite::NegativeDateOffset
- Defined in:
- lib/daru_lite/date_time/offsets.rb
Instance Method Summary collapse
- #+(other) ⇒ Object
- #-(other) ⇒ Object
- #-@ ⇒ Object
-
#initialize(offset) ⇒ NegativeDateOffset
constructor
A new instance of NegativeDateOffset.
Constructor Details
#initialize(offset) ⇒ NegativeDateOffset
Returns a new instance of NegativeDateOffset.
68 69 70 |
# File 'lib/daru_lite/date_time/offsets.rb', line 68 def initialize(offset) @offset = offset end |
Instance Method Details
#+(other) ⇒ Object
72 73 74 |
# File 'lib/daru_lite/date_time/offsets.rb', line 72 def +(other) @offset - other end |
#-(other) ⇒ Object
76 77 78 |
# File 'lib/daru_lite/date_time/offsets.rb', line 76 def -(other) @offset + other end |
#-@ ⇒ Object
80 81 82 |
# File 'lib/daru_lite/date_time/offsets.rb', line 80 def -@ @offset end |