Exception: InstanceAssay
- Defined in:
- lib/assay/instance_assay.rb
Overview
Assert that an object is an instance of a class.
Constant Summary
Constants inherited from Assertion
Constants included from Assay::Assertable
Class Method Summary collapse
-
.pass?(object, class_type) ⇒ Boolean
Check assertion.
Methods inherited from Assertion
by_name, by_operator, inherited, register, subclasses
Methods included from Assay::Assertable
#[], #assert!, #assert_message, #assertive_name, #assertor, #fail?, #operator, #pass?, #refute!, #refute_message
Class Method Details
.pass?(object, class_type) ⇒ Boolean
Check assertion.
12 13 14 |
# File 'lib/assay/instance_assay.rb', line 12 def self.pass?(object, class_type) object.instance_of?(class_type) end |