Class: Guard::Yeti::Dependency

Inherits:
Object
  • Object
show all
Defined in:
lib/guard/yeti/dependency.rb

Class Method Summary collapse

Class Method Details

.verify_or_raise(command) ⇒ Object



4
5
6
7
8
9
# File 'lib/guard/yeti/dependency.rb', line 4

def self.verify_or_raise(command)
  output = system("which #{command} >/dev/null")
  unless $?.to_i == 0
    raise "Error: #{command} is not installed, which is a requirement of guard-yeti" 
  end
end