module Monkey::Gun::CliHelpers

Public Instance Methods

check_for_binaries!(*binaries, &message_block) click to toggle source
# File lib/monkey/gun/cli_helpers.rb, line 4
def check_for_binaries!(*binaries, &message_block)
  binaries.each do |bin|
    check_for_binary!(bin.to_s, &message_block)
  end
end
check_for_binary!(binary, &message_block) click to toggle source
# File lib/monkey/gun/cli_helpers.rb, line 10
def check_for_binary!(binary, &message_block)
  bin_location = `which #{binary.to_s}`
  if bin_location.nil? || bin_location.empty?
    raise message_block.call || ''
  end
end