### Home Classes Methods

### In Files

- lib/state_machine/matcher.rb

### Parent

StateMachine::Matcher

### Methods

- #-
- #description
- #filter
- #matches?

### Included Modules

- Singleton

### Files

- LICENSE

### Class/Module Index

Quicksearch

- StateMachine
- StateMachine::AllMatcher
- StateMachine::Assertions
- StateMachine::AttributeTransitionCollection
- StateMachine::BlacklistMatcher
- StateMachine::Branch
- StateMachine::Callback
- StateMachine::ClassMethods
- StateMachine::Error
- StateMachine::EvalHelpers
- StateMachine::Event
- StateMachine::EventCollection
- StateMachine::Graph
- StateMachine::InstanceMethods
- StateMachine::IntegrationNotFound
- StateMachine::Integrations
- StateMachine::Integrations::ActiveModel
- StateMachine::Integrations::ActiveModel::Observer
- StateMachine::Integrations::ActiveModel::ObserverUpdate
- StateMachine::Integrations::ActiveRecord
- StateMachine::Integrations::Base
- StateMachine::Integrations::Base::ClassMethods
- StateMachine::Integrations::DataMapper
- StateMachine::Integrations::DataMapper::Observer
- StateMachine::Integrations::MongoMapper
- StateMachine::Integrations::Mongoid
- StateMachine::Integrations::Sequel
- StateMachine::InvalidEvent
- StateMachine::InvalidParallelTransition
- StateMachine::InvalidTransition
- StateMachine::LoopbackMatcher
- StateMachine::Machine
- StateMachine::MachineCollection
- StateMachine::MacroMethods
- StateMachine::Matcher
- StateMachine::MatcherHelpers
- StateMachine::NodeCollection
- StateMachine::Path
- StateMachine::PathCollection
- StateMachine::RailsEngine
- StateMachine::State
- StateMachine::StateCollection
- StateMachine::StateContext
- StateMachine::Transition
- StateMachine::TransitionCollection
- StateMachine::WhitelistMatcher
- StateMachine::YARD
- StateMachine::YARD::Handlers
- StateMachine::YARD::Handlers::Base
- StateMachine::YARD::Handlers::Event
- StateMachine::YARD::Handlers::Machine
- StateMachine::YARD::Handlers::State
- StateMachine::YARD::Handlers::Transition
- Object

No matching classes.

# StateMachine::AllMatcher

Matches any given value. Since there is no configuration for this type of matcher, it must be used as a singleton.

### Public Instance Methods

-(blacklist) click to toggle source

Generates a blacklist matcher based on the given set of values

## Examples

    matcher = StateMachine::AllMatcher.instance - [:parked, :idling]
    matcher.matches?(:parked)       # => false
    matcher.matches?(:first_gear)   # => true

    # File lib/state_machine/matcher.rb, line 35
    def -(blacklist)
      BlacklistMatcher.new(blacklist)
    end

description() click to toggle source

A human-readable description of this matcher. Always "all".

    # File lib/state_machine/matcher.rb, line 50
    def description
      'all'
    end

filter(values) click to toggle source

Always returns the given set of values

    # File lib/state_machine/matcher.rb, line 45
    def filter(values)
      values
    end

matches?(value, context = {}) click to toggle source

Always returns true

    # File lib/state_machine/matcher.rb, line 40
    def matches?(value, context = {})
      true
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.