class SubtitleIt::Subline

Attributes

text[RW]
time_off[RW]
time_on[RW]

Public Class Methods

new(time_on, time_off, text) click to toggle source

time_on/off may be: HH:MM:SS,MMM MM:SS S text lines should be separated by |

# 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

Public Instance Methods

filter(*args) click to toggle source
# File lib/subtitle_it/subline.rb, line 19
def filter(*args)
  args.map do |arg|
    Subtime.new(arg)
  end
end