Method: Subber::Subtitle#shift

Defined in:
lib/subber/subtitle.rb

#shift(ms) ⇒ Subber::Subtitle

Return a copy with shifted subtitle

Parameters:

  • miliseconds (Integer)

    Can be both positive and negative

Returns:



26
27
28
29
30
31
32
33
# File 'lib/subber/subtitle.rb', line 26

def shift(ms)
  self.class.new(
    counter: counter,
    start_time: start_time + ms,
    end_time: end_time + ms,
    content: content
  )
end