Sha256: e58783b34b33f255eae85dac0a97bbaabad84bd3c631522474599d20425aa8f6

Contents?: true

Size: 450 Bytes

Versions: 3

Compression:

Stored size: 450 Bytes

Contents

# frozen_string_literal: true

module Ffprober
  module Parsers
    class FileParser
      def initialize(file_to_parse, exec = Ffprober::Ffmpeg::Exec.new)
        unless ::File.exist?(file_to_parse)
          raise ArgumentError, "File not found #{file_to_parse}"
        end

        @file_to_parse = file_to_parse
        @exec = exec
      end

      def load
        JsonParser.new(@exec.json_output(@file_to_parse))
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ffprober-0.5.5 lib/ffprober/parsers/file.rb
ffprober-0.5.3 lib/ffprober/parsers/file.rb
ffprober-0.5.2 lib/ffprober/parsers/file.rb