Sha256: 921da85392da96dc81d93fb45dcf550eeb62a3ad52158d2f90dca55b5542a601
Contents?: true
Size: 551 Bytes
Versions: 25
Compression:
Stored size: 551 Bytes
Contents
module Antrapol module ToolRack module CliUtils include Antrapol::ToolRack::ConditionUtils class CliUtilsError < StandardError; end 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 def self.included(klass) klass.class_eval <<-END extend Antrapol::ToolRack::CliUtils END end end end end
Version data entries
25 entries across 25 versions & 1 rubygems