module Thor::Base::ClassMethods
def namespace(name = nil)
thor :my_command
Your commands can be invoked with a shortcut. Instead of:
namespace :default
Finally, if you change your namespace to default:
thor my_scripts -h
You change how your commands are invoked:
namespace :my_scripts
If you change the namespace:
thor scripts:my_script -h
Scripts::MyScript, the help method, for example, will be called as:
namespace is retrieved from the class name. If your Thor class is named
Sets the namespace for the Thor or Thor::Group class. By default the
def namespace(name = nil) if name @namespace = name.to_s else @namespace ||= Thor::Util.namespace_from_thor_class(self) end end