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.
# File railties/lib/rails/command/base.rb, line 38
def namespace(name = nil)
if name
super
else
@namespace ||= super.chomp("_command").sub(/:command:/, ":")
end
end