Class: Vanguard::Matcher::Nullary::Inclusion
- Inherits:
-
Vanguard::Matcher::Nullary
- Object
- Vanguard::Matcher
- Vanguard::Matcher::Nullary
- Vanguard::Matcher::Nullary::Inclusion
- Defined in:
- lib/vanguard/matcher/nullary/inclusion.rb
Overview
Matcher that tests for inclusion of value
Instance Attribute Summary collapse
-
#accepted ⇒ #include?
readonly
private
Return accepted values.
Instance Method Summary collapse
-
#matches?(value) ⇒ true, false
private
Test if value is included.
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
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
29 30 31 |
# File 'lib/vanguard/matcher/nullary/inclusion.rb', line 29 def matches?(value) accepted.include?(value) end |