Class: Endo::Matchers::BaseMatcher

Inherits:
Object
  • Object
show all
Defined in:
lib/endo/matchers/base_matcher.rb

Direct Known Subclasses

Equal, Include

Instance Attribute Summary collapse

Instance Method Summary collapse

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

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

Returns:

  • (Boolean)


10
11
12
# File 'lib/endo/matchers/base_matcher.rb', line 10

def matches?(actual)
  match(expected, actual)
end