Class StateMachine::BlacklistMatcher
In: lib/state_machine/matcher.rb
Parent: Matcher

Matches everything but a specific set of values

Methods

Public Instance methods

A human-readable description of this matcher

Finds all values that are not within the blacklist configured for this matcher

Checks whether the given value exists outside the blacklist configured for this matcher.

Examples

  matcher = StateMachine::BlacklistMatcher.new([:parked, :idling])
  matcher.matches?(:parked)       # => false
  matcher.matches?(:first_gear)   # => true

[Validate]