Class: Time

Inherits:
Object
  • Object
show all
Defined in:
lib/when_exe/core/duration.rb

Overview

Extensions to Time class

Instance Method Summary collapse

Instance Method Details

#+(other) ⇒ Object



19
20
21
# File 'lib/when_exe/core/duration.rb', line 19

def +(other)
  other.kind_of?(When::TM::Duration) ? self + other.to_f : self._plus_(other)
end

#-(other) ⇒ Object



25
26
27
# File 'lib/when_exe/core/duration.rb', line 25

def -(other)
  other.kind_of?(When::TM::Duration) ? self - other.to_f : self._minus_(other)
end

#_minus_Object



24
# File 'lib/when_exe/core/duration.rb', line 24

alias :_minus_ :-

#_plus_Object



18
# File 'lib/when_exe/core/duration.rb', line 18

alias :_plus_  :+