Class: IdentityParade::Matcher

Inherits:
Object
  • Object
show all
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.

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#leftObject (readonly)

Returns the value of attribute left.



7
8
9
# File 'lib/identity_parade/matcher.rb', line 7

def left
  @left
end

#rightObject (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

#scoreObject

Raises:

  • (NotImplementedError)


14
15
16
# File 'lib/identity_parade/matcher.rb', line 14

def score
  raise NotImplementedError
end