Class: Gamefic::Command

Inherits:
Object
  • Object
show all
Defined in:
lib/gamefic/command.rb

Overview

A concrete representation of an input as a verb and an array of arguments.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(verb, arguments) ⇒ Command

Returns a new instance of Command.

Parameters:



15
16
17
18
# File 'lib/gamefic/command.rb', line 15

def initialize verb, arguments
  @verb = verb
  @arguments = arguments
end

Instance Attribute Details

#argumentsArray<Array<Entity>, Entity, String> (readonly)

Returns:



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

def arguments
  @arguments
end

#verbSymbol (readonly)

Returns:

  • (Symbol)


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

def verb
  @verb
end