Class: Daru::NegativeDateOffset
Instance Method Summary collapse
- #+(date_time) ⇒ Object
- #-(date_time) ⇒ Object
- #-@ ⇒ Object
-
#initialize(offset) ⇒ NegativeDateOffset
constructor
A new instance of NegativeDateOffset.
Constructor Details
#initialize(offset) ⇒ NegativeDateOffset
Returns a new instance of NegativeDateOffset.
70 71 72 |
# File 'lib/daru/date_time/offsets.rb', line 70 def initialize(offset) @offset = offset end |
Instance Method Details
#+(date_time) ⇒ Object
74 75 76 |
# File 'lib/daru/date_time/offsets.rb', line 74 def + date_time @offset - date_time end |
#-(date_time) ⇒ Object
78 79 80 |
# File 'lib/daru/date_time/offsets.rb', line 78 def - date_time @offset + date_time end |
#-@ ⇒ Object
82 83 84 |
# File 'lib/daru/date_time/offsets.rb', line 82 def -@ @offset end |