Class: SubtitleIt::Subline
- Inherits:
-
Object
- Object
- SubtitleIt::Subline
- Defined in:
- lib/subtitle_it/subline.rb
Instance Attribute Summary collapse
-
#text ⇒ Object
Returns the value of attribute text.
-
#time_off ⇒ Object
Returns the value of attribute time_off.
-
#time_on ⇒ Object
Returns the value of attribute time_on.
Instance Method Summary collapse
- #filter(*args) ⇒ Object
-
#initialize(time_on, time_off, text) ⇒ Subline
constructor
time_on/off may be: HH:MM:SS,MMM MM:SS S text lines should be separated by |.
Constructor Details
#initialize(time_on, time_off, text) ⇒ Subline
time_on/off may be: HH:MM:SS,MMM MM:SS S text lines should be separated by |
11 12 13 14 15 16 17 |
# File 'lib/subtitle_it/subline.rb', line 11 def initialize(time_on, time_off, text) @time_on, @time_off = filter(time_on, time_off) # ugly FIXME: when pseudo uses time => 3 or TT format # need to add seconds on time_off to time_on @time_off += @time_on if @time_off < @time_on @text = text end |
Instance Attribute Details
#text ⇒ Object
Returns the value of attribute text.
5 6 7 |
# File 'lib/subtitle_it/subline.rb', line 5 def text @text end |
#time_off ⇒ Object
Returns the value of attribute time_off.
5 6 7 |
# File 'lib/subtitle_it/subline.rb', line 5 def time_off @time_off end |
#time_on ⇒ Object
Returns the value of attribute time_on.
5 6 7 |
# File 'lib/subtitle_it/subline.rb', line 5 def time_on @time_on end |