Class: Tabry::Machine
- Inherits:
-
Object
- Object
- Tabry::Machine
- Defined in:
- lib/tabry/machine.rb
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
-
#state ⇒ Object
readonly
Returns the value of attribute state.
Class Method Summary collapse
-
.run(config, tokens) ⇒ Object
Returns a state.
Instance Method Summary collapse
-
#initialize(config) ⇒ Machine
constructor
A new instance of Machine.
- #run(tokens) ⇒ Object
Constructor Details
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
12 13 14 |
# File 'lib/tabry/machine.rb', line 12 def config @config end |
#state ⇒ Object (readonly)
Returns the value of attribute state.
12 13 14 |
# File 'lib/tabry/machine.rb', line 12 def state @state end |
Class Method Details
.run(config, tokens) ⇒ Object
Returns a state
15 16 17 18 19 |
# File 'lib/tabry/machine.rb', line 15 def self.run(config, tokens) machine = new(config) machine.run(tokens) machine.state end |