class Titlekit::SRT::Timecode

Internal intermediate class used for parsing with treetop

Public Instance Methods

build() click to toggle source
# File lib/titlekit/parsers/srt.rb, line 27
def build
  value = 0
  value += hours.text_value.to_i * 3600
  value += minutes.text_value.to_i * 60
  value += seconds.text_value.to_i
  "#{value}.#{fractions.text_value}".to_f
end