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

Matches a specific set of values

Methods

Public Instance methods

A human-readable description of this matcher

Checks whether the given value exists within the whitelist configured for this matcher.

Examples

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

[Validate]