Class: Gamefic::Command

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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

#argumentsObject (readonly)

Returns the value of attribute arguments.



12
13
14
# File 'lib/gamefic/command.rb', line 12

def arguments
  @arguments
end

#verbObject (readonly)

Returns the value of attribute verb.



8
9
10
# File 'lib/gamefic/command.rb', line 8

def verb
  @verb
end