Methods
- B
- C
- D
- E
- H
- N
- P
- U
Included Modules
Class Public methods
base_name() Link
Sets the base_name
taking into account the current class namespace.
Rails::Command::TestCommand.base_name # => 'rails'
command_name() Link
Return command name without namespaces.
Rails::Command::TestCommand.command_name # => 'test'
default_command_root() Link
Default file root to place extra files a command might need, placed one folder above the command file.
For a Rails::Command::TestCommand placed in rails/command/test_command.rb
would return rails/test
.
desc(usage = nil, description = nil, options = {}) Link
Tries to get the description from a USAGE file one folder above the command root.
engine?() Link
Returns true when the app is a Rails engine.
executable(command_name = self.command_name) Link
hide_command!() Link
Convenience method to hide this command from the available ones when running rails command.
namespace(name = nil) Link
Convenience method to get the namespace from the class name. It’s the same as Thor default except that the Command
at the end of the class is removed.