Method: CommandMapper::Command.command_name

Defined in:
lib/command_mapper/command.rb

.command_nameString

Gets or sets the command name.

Returns:

  • (String)

    The command name.

Raises:

  • (NotImplementedError)

    The command class did not call command.

[View source]

292
293
294
295
296
297
298
# File 'lib/command_mapper/command.rb', line 292

def self.command_name
  @command_name || if superclass < Command
                     superclass.command_name
                   else
                     raise(NotImplementedError,"#{self} did not call command(...)")
                   end
end