Method: CommandKit::Commands::AutoLoad::Subcommand#command

Defined in:
lib/command_kit/commands/auto_load/subcommand.rb

#commandClass

Lazy-loads the command class.

Returns:

  • (Class)

    The command class.

Raises:

  • (LoadError)

    Could not load the given #path.

  • (NameError)

    Could not resolve the #constant for the command class.



85
86
87
88
89
90
# File 'lib/command_kit/commands/auto_load/subcommand.rb', line 85

def command
  @command ||= (
    require!
    const_get
  )
end