Class: Vanguard::Matcher::Nullary::Inclusion

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

Overview

Matcher that tests for inclusion of value

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#accepted#include? (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 accepted values

Returns:

  • (#include?)


15
16
17
# File 'lib/vanguard/matcher/nullary/inclusion.rb', line 15

def accepted
  @accepted
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 is included

Parameters:

  • value (Object)

Returns:

  • (true)

    if value is included

  • (false)

    otherwise



29
30
31
# File 'lib/vanguard/matcher/nullary/inclusion.rb', line 29

def matches?(value)
  accepted.include?(value)
end