lib/timed/item.rb in timed-0.2.0 vs lib/timed/item.rb in timed-0.2.1
- old
+ new
@@ -85,9 +85,14 @@
raise RuntimeError unless after? other
raise RuntimeError unless first? || before?(previous)
super
end
+
+ # Offset a given time using the settings of the sequence, if the item is in
+ # a sequence.
+ #
+ # Returns the time offset correctly.
protected def offset(time)
in_sequence? ? sequence.offset(time) : time
end
end