Class: Stendhal::Matchers::Kind
- Inherits:
-
AbstractMatcher
- Object
- AbstractMatcher
- Stendhal::Matchers::Kind
- Defined in:
- lib/stendhal/matchers/kind.rb
Instance Attribute Summary
Attributes inherited from AbstractMatcher
Instance Method Summary collapse
Methods inherited from AbstractMatcher
Constructor Details
This class inherits a constructor from Stendhal::Matchers::AbstractMatcher
Instance Method Details
#match(original, options = {}) ⇒ Object
5 6 7 8 9 10 11 12 13 |
# File 'lib/stendhal/matchers/kind.rb', line 5 def match(original, = {}) = "expected #{original.inspect} #{[:negative] ? 'not ' : ''}to be a #{@target.inspect}" if [:negative] raise Stendhal::Exceptions::ExpectationNotMet.new() if original.is_a?(@target) else raise Stendhal::Exceptions::ExpectationNotMet.new() unless original.is_a?(@target) end true end |