Method: CommandKit::Commands::AutoRequire#const_get

Defined in:
lib/command_kit/commands/auto_require.rb

#const_get(constant) ⇒ Class

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Resolves the constant for the command class within the #namespace.

Parameters:

  • The constant name.

Returns:

  • The command class.

Raises:

  • The command class could not be found within the #namespace.

API:

  • private



101
102
103
# File 'lib/command_kit/commands/auto_require.rb', line 101

def const_get(constant)
  Object.const_get("::#{@namespace}::#{constant}",false)
end