Module: Gamefic::Scriptable::Syntaxes
- Included in:
- Gamefic::Scriptable, Responses
- Defined in:
- lib/gamefic/scriptable/syntaxes.rb
Instance Method Summary collapse
-
#interpret(command, translation) ⇒ Syntax
Create an alternate Syntax for a response.
- #syntaxes ⇒ Object
Instance Method Details
#interpret(command, translation) ⇒ Syntax
Create an alternate Syntax for a response. The command and its translation can be parameterized.
20 21 22 |
# File 'lib/gamefic/scriptable/syntaxes.rb', line 20 def interpret command, translation syntaxes.push(Syntax.new(command, translation)).last end |
#syntaxes ⇒ Object
24 25 26 |
# File 'lib/gamefic/scriptable/syntaxes.rb', line 24 def syntaxes @syntaxes ||= [] end |