Class: Vanguard::Matcher::Nullary::Equality

Inherits:
Vanguard::Matcher::Nullary show all
Defined in:
lib/vanguard/matcher/nullary/equality.rb

Overview

Equality matcher

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#valueObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Return value

Returns:

  • (Object)


14
15
16
# File 'lib/vanguard/matcher/nullary/equality.rb', line 14

def value
  @value
end

Instance Method Details

#matches?(value) ⇒ true, false

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Test if value for equality

Parameters:

  • value (Object)

Returns:

  • (true)
  • (false)


26
27
28
# File 'lib/vanguard/matcher/nullary/equality.rb', line 26

def matches?(value)
  value == self.value
end