method
namespace
v2_6_3 -
Show latest stable
-
0 notes -
Class: ClassMethods
- 1_8_6_287
- 1_8_7_72
- 1_8_7_330
- 1_9_1_378
- 1_9_2_180
- 1_9_3_125
- 1_9_3_392
- 2_1_10
- 2_2_9
- 2_4_6
- 2_5_5
- 2_6_3 (0)
- What's this?
namespace(name = nil)
public
Sets the namespace for the Bundler::Thor or Bundler::Thor::Group class. By default the namespace is retrieved from the class name. If your Bundler::Thor class is named Scripts::MyScript, the help method, for example, will be called as:
thor scripts:my_script -h
If you change the namespace:
namespace :my_scripts
You change how your commands are invoked:
thor my_scripts -h
Finally, if you change your namespace to default:
namespace :default
Your commands can be invoked with a shortcut. Instead of:
thor :my_command