Class: CodeUnion::Command::Main
- Defined in:
- lib/codeunion/command/main.rb
Overview
The built-in main ‘codeunion` command
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from CodeUnion::Command::Base
Instance Method Details
#exist? ⇒ Boolean
16 17 18 |
# File 'lib/codeunion/command/main.rb', line 16 def exist? File.which(executable_name) end |
#run ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/codeunion/command/main.rb', line 8 def run if exist? exec(executable_name, *command_args) else fail CommandNotFound, "Unknown command `#{command_name}`." end end |