Module: Antrapol::ToolRack::CliUtils
- Includes:
- ConditionUtils
- Defined in:
- lib/toolrack/cli_utils.rb
Defined Under Namespace
Classes: CliUtilsError
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(klass) ⇒ Object
20 21 22 23 24 |
# File 'lib/toolrack/cli_utils.rb', line 20 def self.included(klass) klass.class_eval <<-END extend Antrapol::ToolRack::CliUtils END end |
Instance Method Details
#which(app) ⇒ Object
10 11 12 13 14 15 16 17 |
# File 'lib/toolrack/cli_utils.rb', line 10 def which(app) if not_empty?(app) path = `which #{app}` path.strip if not_empty?(path) else raise CliUtilsError, "Given appication to look for full path (which) is empty" end end |