Class: RuneRb::Game::Entity::Command

Inherits:
Object
  • Object
show all
Includes:
System::Log
Defined in:
app/game/entity/models/command.rb

Overview

A Command that is executed by a context entity.

Since:

  • 0.9.3

Instance Method Summary collapse

Methods included from System::Log

#class_name, #err, #err!, #log, #log!, #symbolize_file

Constructor Details

#initialize(assets) ⇒ Command

Called when a new Command object is created

Parameters:

  • assets (Hash)

    the assets for command execution.

Since:

  • 0.9.3


9
10
11
12
13
14
15
16
# File 'app/game/entity/models/command.rb', line 9

def initialize(assets)
  @context = assets[:context]
  @world = @context.world
  @command = assets[:command]
  @message = assets[:message]
  @assets = assets
  execute
end

Instance Method Details

#executeObject

Executes the Command.

Since:

  • 0.9.3


19
# File 'app/game/entity/models/command.rb', line 19

def execute; end