Class: Dotrun
- Inherits:
-
Object
- Object
- Dotrun
- Defined in:
- lib/dotrun.rb
Constant Summary collapse
- DIRECTIVES_PATH =
".run"
Instance Method Summary collapse
-
#run(*args) ⇒ Object
The main operation method.
Instance Method Details
#run(*args) ⇒ Object
The main operation method. This is called when running ‘dotrun` from the command line.
9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/dotrun.rb', line 9 def run(*args) print_help_and_exit if args.first == "-?" directive = args.first || "default" command = command_for(directive) if command.is_a?(Array) exec_multiple_directives directive, command else exec_directive directive, command end end |