Class: Bonito::OffsetTimeline
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- Bonito::OffsetTimeline
- Defined in:
- lib/bonito/timeline.rb
Overview
:nodoc:
Direct Known Subclasses
Instance Attribute Summary collapse
-
#offset ⇒ Object
readonly
Returns the value of attribute offset.
Instance Method Summary collapse
- #<=>(other) ⇒ Object
- #==(other) ⇒ Object
-
#initialize(timeline, offset) ⇒ OffsetTimeline
constructor
A new instance of OffsetTimeline.
- #schedule(starting_offset, scope, opts = {}) ⇒ Object
Constructor Details
#initialize(timeline, offset) ⇒ OffsetTimeline
Returns a new instance of OffsetTimeline.
45 46 47 48 |
# File 'lib/bonito/timeline.rb', line 45 def initialize(timeline, offset) @offset = offset super timeline end |
Instance Attribute Details
#offset ⇒ Object (readonly)
Returns the value of attribute offset.
44 45 46 |
# File 'lib/bonito/timeline.rb', line 44 def offset @offset end |
Instance Method Details
#<=>(other) ⇒ Object
54 55 56 |
# File 'lib/bonito/timeline.rb', line 54 def <=>(other) offset <=> other.offset end |
#==(other) ⇒ Object
50 51 52 |
# File 'lib/bonito/timeline.rb', line 50 def ==(other) offset == other.offset && __getobj__ == other.__getobj__ end |
#schedule(starting_offset, scope, opts = {}) ⇒ Object
58 59 60 |
# File 'lib/bonito/timeline.rb', line 58 def schedule(starting_offset, scope, opts = {}) __getobj__.scheduler(starting_offset + offset, scope, opts) end |