Class: OnyxCord::Commands::CommandAlias
- Inherits:
-
Object
- Object
- OnyxCord::Commands::CommandAlias
- Defined in:
- lib/onyxcord/commands/parser.rb
Overview
A command that references another command
Instance Attribute Summary collapse
-
#aliased_command ⇒ Command
readonly
The command this alias points to.
-
#name ⇒ Symbol
readonly
The name of this alias.
Instance Method Summary collapse
-
#initialize(name, aliased_command) ⇒ CommandAlias
constructor
A new instance of CommandAlias.
Constructor Details
#initialize(name, aliased_command) ⇒ CommandAlias
Returns a new instance of CommandAlias.
215 216 217 218 |
# File 'lib/onyxcord/commands/parser.rb', line 215 def initialize(name, aliased_command) @name = name @aliased_command = aliased_command end |
Instance Attribute Details
#aliased_command ⇒ Command (readonly)
Returns the command this alias points to.
213 214 215 |
# File 'lib/onyxcord/commands/parser.rb', line 213 def aliased_command @aliased_command end |
#name ⇒ Symbol (readonly)
Returns the name of this alias.
210 211 212 |
# File 'lib/onyxcord/commands/parser.rb', line 210 def name @name end |