Sha256: e0bf42eda891e4eb585182b9e839483a361b54e26ed36a2f120e26014972a9f1

Contents?: true

Size: 799 Bytes

Versions: 2

Compression:

Stored size: 799 Bytes

Contents

#
# Capturer Baseclass
#

module VCSRuby
  class Capturer
    def available?
      false
    end

    def name
      raise "NotImplementedException"
    end

    def load_video
      raise "NotImplementedException"
    end

    def length
      raise "NotImplementedException"
    end

    def width
      raise "NotImplementedException"
    end

    def height
      raise "NotImplementedException"
    end

    def grab time, image_path
      raise "NotImplementedException"
    end

    def available_formats
      raise "NotImplementedException"
    end

    def format
      @format
    end

    def format= format
      if available_formats.include? format
        @format = format
      else
        raise "Capturer '#{name}' does not support format: '#{format}'"
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
vcs_ruby-1.0.1 lib/capturer.rb
vcs_ruby-1.0.0 lib/capturer.rb