command_name()
Return command name without namespaces.
Rails::Command::TestCommand.command_name # => 'test'
# File railties/lib/rails/command/base.rb, line 115 def command_name @command_name ||= if command = name.to_s.split("::").last command.chomp!("Command") command.underscore end end