base_name()
Sets the base_name taking into account the current class namespace.
Rails::Command::TestCommand.base_name # => 'rails'
# File railties/lib/rails/command/base.rb, line 84 def base_name @base_name ||= begin if base = name.to_s.split("::").first base.underscore end end end