Class: Mealy::Label
- Inherits:
-
Object
- Object
- Mealy::Label
- 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
Instance Method Summary collapse
-
#initialize(label) ⇒ Label
constructor
A new instance of Label.
- #match?(input) ⇒ Boolean
Constructor Details
#initialize(label) ⇒ Label
Returns a new instance of 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 |