Class: Titlekit::SRT::Timecode

Inherits:
Treetop::Runtime::SyntaxNode
  • Object
show all
Defined in:
lib/titlekit/parsers/srt.rb

Overview

Internal intermediate class used for parsing with treetop

Instance Method Summary collapse

Instance Method Details

#buildObject



27
28
29
30
31
32
33
34
# 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 += "0.#{fractions.text_value}".to_f
  value
end