Method: MTK::Core::Duration#-

Defined in:
lib/mtk/core/duration.rb

#-(duration) ⇒ Object

Subtract another duration from this one.

Returns:

  • a new Duration that has a value of the difference of the arguments.



172
173
174
175
176
177
178
# File 'lib/mtk/core/duration.rb', line 172

def - duration
  if duration.is_a? MTK::Core::Duration
    MTK::Core::Duration[@value - duration.value]
  else
    MTK::Core::Duration[@value - duration]
  end
end