Provides a general strategy pattern for determining whether a match is found for a value. The algorithm that actually determines the match depends on the matcher in use.
The list of values against which queries are matched
Creates a new matcher for querying against the given set of values
# File lib/state_machine/matcher.rb, line 12 def initialize(values = []) @values = values.is_a?(Array) ? values : [values] end
Generates a subset of values that exists in both the set of values being filtered and the values configured for the matcher
# File lib/state_machine/matcher.rb, line 18 def filter(values) self.values & values end