class Webvtt::Cue
Attributes
end[RW]
identifier[RW]
settings[RW]
start[RW]
text[RW]
Public Class Methods
new(opts={})
click to toggle source
# File lib/webvtt/cue.rb, line 4 def initialize(opts={}) if !opts.empty? @identifier = opts[:identifier] @text = opts[:text] cue_parts = opts[:cue_line].split('-->') @start = cue_parts.first.strip remaining_cue_parts = cue_parts.last.split(" ") @end = remaining_cue_parts.shift.strip @settings = remaining_cue_parts.join(' ') end end