module ScreenRecorder::TypeChecker

@since 1.0.0.beta10

@api private

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/screen-recorder/type_checker.rb, line 10
def self.check(obj, klass)
  raise ArgumentError, "Expected #{klass}, given: #{obj.class}" unless obj.is_a? klass
end