Class: Daru::NegativeDateOffset

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

Instance Method Summary collapse

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