Class: Rubycord::Commands::CommandAlias

Inherits:
Object
  • Object
show all
Defined in:
lib/rubycord/commands/parser.rb

Overview

A command that references another command

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, aliased_command) ⇒ CommandAlias

Returns a new instance of CommandAlias.



130
131
132
133
# File 'lib/rubycord/commands/parser.rb', line 130

def initialize(name, aliased_command)
  @name = name
  @aliased_command = aliased_command
end

Instance Attribute Details

#aliased_commandCommand (readonly)

Returns the command this alias points to.

Returns:

  • (Command)

    the command this alias points to



128
129
130
# File 'lib/rubycord/commands/parser.rb', line 128

def aliased_command
  @aliased_command
end

#nameSymbol (readonly)

Returns the name of this alias.

Returns:

  • (Symbol)

    the name of this alias



125
126
127
# File 'lib/rubycord/commands/parser.rb', line 125

def name
  @name
end