Class: Endo::Matchers::BaseMatcher
- Inherits:
-
Object
- Object
- Endo::Matchers::BaseMatcher
- Defined in:
- lib/endo/matchers/base_matcher.rb
Instance Attribute Summary collapse
-
#expected ⇒ Object
readonly
Returns the value of attribute expected.
Instance Method Summary collapse
-
#initialize(expected) ⇒ BaseMatcher
constructor
A new instance of BaseMatcher.
- #matches?(actual) ⇒ Boolean
Constructor Details
#initialize(expected) ⇒ BaseMatcher
Returns a new instance of BaseMatcher.
6 7 8 |
# File 'lib/endo/matchers/base_matcher.rb', line 6 def initialize(expected) @expected = expected end |
Instance Attribute Details
#expected ⇒ Object (readonly)
Returns the value of attribute expected.
4 5 6 |
# File 'lib/endo/matchers/base_matcher.rb', line 4 def expected @expected end |
Instance Method Details
#matches?(actual) ⇒ Boolean
10 11 12 |
# File 'lib/endo/matchers/base_matcher.rb', line 10 def matches?(actual) match(expected, actual) end |