class Subconv::Scc::Caption
One fully rendered caption displayed at a specific point in time
Attributes
char_replacement[W]
grid[RW]
mode[R]
timecode[RW]
Public Class Methods
new(args)
click to toggle source
# File lib/subconv/scc/reader.rb, line 147 def initialize(args) # Inject default args = { mode: :pop_on, char_replacement: false }.merge(args) self.timecode = args[:timecode] self.grid = args[:grid] self.mode = args[:mode] self.char_replacement = args[:char_replacement] end
Public Instance Methods
==(other)
click to toggle source
# File lib/subconv/scc/reader.rb, line 156 def ==(other) timecode == other.timecode && grid == other.grid && mode == other.mode && char_replacement? == other.char_replacement? end
Also aliased as: eql?
char_replacement?()
click to toggle source
Is this caption just replacing an existing character with an extended character?
# File lib/subconv/scc/reader.rb, line 181 def char_replacement? @char_replacement end
mode=(mode)
click to toggle source
# File lib/subconv/scc/reader.rb, line 166 def mode=(mode) fail 'Unknown mode' unless %i[pop_on paint_on].include?(mode) @mode = mode end
paint_on_mode?()
click to toggle source
# File lib/subconv/scc/reader.rb, line 176 def paint_on_mode? @mode == :paint_on end
pop_on_mode?()
click to toggle source
# File lib/subconv/scc/reader.rb, line 172 def pop_on_mode? @mode == :pop_on end