module FFMPEG::TypeChecker
@since 1.0.0.beta10
Public Class Methods
check(obj, klass)
click to toggle source
Compares the given object's type (class) to the desired object type. Raises an ArgumentError if the object is not of desired type.
# File lib/ffmpeg/type_checker.rb, line 8 def self.check(obj, klass) raise ArgumentError, "Expected #{klass}, given: #{obj.class}" unless obj.is_a? klass end