Class: FFSplitter::Chapter

Inherits:
Object
  • Object
show all
Defined in:
lib/ffsplitter/chapter.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#listObject

Returns the value of attribute list.



30
31
32
# File 'lib/ffsplitter/chapter.rb', line 30

def list
  @list
end

Instance Method Details

#end_timeObject



36
37
38
# File 'lib/ffsplitter/chapter.rb', line 36

def end_time
  timebase * end_frames
end

#filenameObject



40
41
42
# File 'lib/ffsplitter/chapter.rb', line 40

def filename
  "#{track} #{title.gsub(/[';:\\]/, '').lstrip}"
end

#indexObject



44
45
46
47
# File 'lib/ffsplitter/chapter.rb', line 44

def index
  return 0 if list.nil?
  list.find_index(self)
end

#start_timeObject



32
33
34
# File 'lib/ffsplitter/chapter.rb', line 32

def start_time
  timebase * start_frames
end

#trackObject



49
50
51
# File 'lib/ffsplitter/chapter.rb', line 49

def track
  (index + 1).to_s.rjust(2, '0')
end