Class: IdentityParade::Matcher
- Inherits:
-
Object
- Object
- IdentityParade::Matcher
- Defined in:
- lib/identity_parade/matcher.rb
Overview
The base class for all matchers implements the basic interface for all matchers.
Every matcher MUST implement a score method that returns a Number.
Direct Known Subclasses
IdentityParade::Matchers::ArrayMatcher, IdentityParade::Matchers::BooleanMatcher, IdentityParade::Matchers::HashMatcher, IdentityParade::Matchers::NumericMatcher, IdentityParade::Matchers::StringMatcher
Instance Attribute Summary collapse
-
#left ⇒ Object
readonly
Returns the value of attribute left.
-
#right ⇒ Object
readonly
Returns the value of attribute right.
Instance Method Summary collapse
-
#initialize(left, right) ⇒ Matcher
constructor
A new instance of Matcher.
- #score ⇒ Object
Constructor Details
#initialize(left, right) ⇒ Matcher
Returns a new instance of Matcher.
9 10 11 12 |
# File 'lib/identity_parade/matcher.rb', line 9 def initialize(left, right) @left = left @right = right end |
Instance Attribute Details
#left ⇒ Object (readonly)
Returns the value of attribute left.
7 8 9 |
# File 'lib/identity_parade/matcher.rb', line 7 def left @left end |
#right ⇒ Object (readonly)
Returns the value of attribute right.
7 8 9 |
# File 'lib/identity_parade/matcher.rb', line 7 def right @right end |
Instance Method Details
#score ⇒ Object
14 15 16 |
# File 'lib/identity_parade/matcher.rb', line 14 def score raise NotImplementedError end |