Class: Pageflow::PaperclipProcessors::Vtt Private

Inherits:
Paperclip::Processor
  • Object
show all
Defined in:
lib/pageflow/paperclip_processors/vtt.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Instance Method Summary collapse

Instance Method Details

#makeObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



8
9
10
11
12
13
14
15
16
17
18
# File 'lib/pageflow/paperclip_processors/vtt.rb', line 8

def make
  destination = make_tempfile_for(file.path)

  if File.extname(file.path) =~ /\.srt$/
    srt_to_vtt(file.path, destination.path)
  else
    FileUtils.cp(file.path, destination.path)
  end

  destination
end