Sha256: 4a2177abab46e38b802f551ece6b7f09d1a897074376221d9bf928874449cd1a

Contents?: true

Size: 382 Bytes

Versions: 6

Compression:

Stored size: 382 Bytes

Contents

module ScreenRecorder
  # @since 1.0.0.beta10
  #
  # @api private
  module TypeChecker
    #
    # Compares the given object's type (class) to the desired object type.
    # Raises an ArgumentError if the object is not of desired type.
    #
    def self.check(obj, klass)
      raise ArgumentError, "Expected #{klass}, given: #{obj.class}" unless obj.is_a? klass
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
screen-recorder-1.7.0 lib/screen-recorder/type_checker.rb
screen-recorder-1.6.0 lib/screen-recorder/type_checker.rb
screen-recorder-1.5.0 lib/screen-recorder/type_checker.rb
screen-recorder-1.4.0 lib/screen-recorder/type_checker.rb
screen-recorder-1.3.1 lib/screen-recorder/type_checker.rb
screen-recorder-1.3.0 lib/screen-recorder/type_checker.rb