Class: Specifier::Matcher::Equal
- Defined in:
- lib/specifier/matcher/equal.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(value) ⇒ Equal
constructor
A new instance of Equal.
- #match?(expected) ⇒ Boolean
- #message ⇒ Object
Constructor Details
#initialize(value) ⇒ Equal
Returns a new instance of Equal.
4 5 6 |
# File 'lib/specifier/matcher/equal.rb', line 4 def initialize(value) @value = value end |
Instance Method Details
#match?(expected) ⇒ Boolean
8 9 10 11 |
# File 'lib/specifier/matcher/equal.rb', line 8 def match?(expected) super expected.eql?(@value) end |
#message ⇒ Object
13 14 15 |
# File 'lib/specifier/matcher/equal.rb', line 13 def "expected #{@expected.inspect} got #{@value.inspect}" end |