class Abrizer::FfprobeFile

Public Class Methods

new(filename, output_directory) click to toggle source
# File lib/abrizer/ffprobe_file.rb, line 6
def initialize(filename, output_directory)
  @informer = FfprobeInformer.new(filepath: filename)
  @output_directory = output_directory
  FileUtils.mkdir_p @output_directory unless File.exist? @output_directory
end

Public Instance Methods

run() click to toggle source
# File lib/abrizer/ffprobe_file.rb, line 12
def run
  File.open(ffprobe_filepath, 'w') do |fh|
    fh.puts @informer.to_json
  end
end