Class: Voot::CueTiming
- Inherits:
-
Object
- Object
- Voot::CueTiming
- Defined in:
- lib/voot/cue_timing.rb
Instance Attribute Summary collapse
-
#end_seconds ⇒ Object
readonly
Returns the value of attribute end_seconds.
-
#start_seconds ⇒ Object
readonly
Returns the value of attribute start_seconds.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ CueTiming
constructor
A new instance of CueTiming.
- #to_webvtt ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ CueTiming
Returns a new instance of CueTiming.
5 6 7 8 |
# File 'lib/voot/cue_timing.rb', line 5 def initialize( = {}) @start_seconds = .fetch(:start_seconds) @end_seconds = .fetch(:end_seconds) end |
Instance Attribute Details
#end_seconds ⇒ Object (readonly)
Returns the value of attribute end_seconds.
3 4 5 |
# File 'lib/voot/cue_timing.rb', line 3 def end_seconds @end_seconds end |
#start_seconds ⇒ Object (readonly)
Returns the value of attribute start_seconds.
3 4 5 |
# File 'lib/voot/cue_timing.rb', line 3 def start_seconds @start_seconds end |
Instance Method Details
#to_webvtt ⇒ Object
10 11 12 |
# File 'lib/voot/cue_timing.rb', line 10 def to_webvtt "#{(start_seconds)} --> #{(end_seconds)}" end |