Class: Gimme::Matchers::IsA
Direct Known Subclasses
Instance Method Summary collapse
-
#initialize(cls) ⇒ IsA
constructor
A new instance of IsA.
- #matches?(arg) ⇒ Boolean
Constructor Details
#initialize(cls) ⇒ IsA
Returns a new instance of IsA.
19 20 21 |
# File 'lib/gimme/matchers.rb', line 19 def initialize(cls) @cls = cls end |
Instance Method Details
#matches?(arg) ⇒ Boolean
23 24 25 |
# File 'lib/gimme/matchers.rb', line 23 def matches?(arg) arg.kind_of?(@cls) end |