Method: Kleene::NFA#matches

Defined in:
lib/kleene/nfa.rb

#matches(input) ⇒ Object

Returns an array of matches found anywhere in the input string



148
149
150
151
152
# File 'lib/kleene/nfa.rb', line 148

def matches(input)
  (0...input.size).reduce([]) do |memo, offset|
    memo + matches_at_offset(input, offset)
  end
end