| Class | StateMachine::AllMatcher |
| In: |
lib/state_machine/matcher.rb
|
| Parent: | Matcher |
Matches any given value. Since there is no configuration for this type of matcher, it must be used as a singleton.
Generates a blacklist matcher based on the given set of values
matcher = StateMachine::AllMatcher.instance - [:parked, :idling] matcher.matches?(:parked) # => false matcher.matches?(:first_gear) # => true
# File lib/state_machine/matcher.rb, line 35
35: def -(blacklist)
36: BlacklistMatcher.new(blacklist)
37: end
A human-readable description of this matcher. Always "all".
# File lib/state_machine/matcher.rb, line 50
50: def description
51: 'all'
52: end
Always returns the given set of values
# File lib/state_machine/matcher.rb, line 45
45: def filter(values)
46: values
47: end