Class: Titlekit::Want

Inherits:
Specification show all
Defined in:
lib/titlekit/want.rb

Instance Attribute Summary

Attributes inherited from Specification

#subtitles

Instance Method Summary collapse

Methods inherited from Specification

#encoding, #file, #fps, #reference, #references, #track

Constructor Details

#initializeWant

Returns a new instance of Want.



4
5
6
7
# File 'lib/titlekit/want.rb', line 4

def initialize
  super
  @glue_treshold = 0.3
end

Instance Method Details

#glue_treshold(*args) ⇒ Object

For dual+ subtitles the starts and ends of simultaneously occuring subtitles can be micro-adjusted together if their distance is smaller than the glue_treshold. Normally defaults to 0.3

Parameters:

  • Specifies (Float)

    the new glue_treshold

Returns:

  • If you omit the argument, it returns the set glue_treshold



15
16
17
18
19
20
21
22
# File 'lib/titlekit/want.rb', line 15

def glue_treshold(*args)
  if args.empty?
    return @glue_treshold
  else
    @glue_treshold = args[0]
    return self
  end
end