Class: Mealy::Label

Inherits:
Object
  • Object
show all
Defined in:
lib/mealy/label.rb

Overview

FSM state transition arrow labels. In effect we match the input tokens against the labels to decide which transition to take.

Direct Known Subclasses

AnyLabel

Instance Method Summary collapse

Constructor Details

#initialize(label) ⇒ Label



10
11
12
# File 'lib/mealy/label.rb', line 10

def initialize(label)
  @label = label
end

Instance Method Details

#match?(input) ⇒ Boolean



15
16
17
# File 'lib/mealy/label.rb', line 15

def match?(input)
  @label === input
end