Class: Gamefic::Command
- Inherits:
-
Object
- Object
- Gamefic::Command
- Defined in:
- lib/gamefic/command.rb
Overview
A Command is a collection of tokens parsed from a Syntax. The Director uses Commands to find and execute corresponding Actions.
Instance Attribute Summary collapse
-
#arguments ⇒ Object
readonly
Returns the value of attribute arguments.
-
#verb ⇒ Object
readonly
Returns the value of attribute verb.
Instance Method Summary collapse
-
#initialize(verb, arguments) ⇒ Command
constructor
A new instance of Command.
Constructor Details
#initialize(verb, arguments) ⇒ Command
14 15 16 17 |
# File 'lib/gamefic/command.rb', line 14 def initialize verb, arguments @verb = verb @arguments = arguments end |
Instance Attribute Details
#arguments ⇒ Object (readonly)
Returns the value of attribute arguments.
12 13 14 |
# File 'lib/gamefic/command.rb', line 12 def arguments @arguments end |
#verb ⇒ Object (readonly)
Returns the value of attribute verb.
8 9 10 |
# File 'lib/gamefic/command.rb', line 8 def verb @verb end |