Module: Monkey::Gun::CliHelpers
- Defined in:
- lib/monkey/gun/cli_helpers.rb
Instance Method Summary collapse
- #check_for_binaries!(*binaries, &message_block) ⇒ Object
- #check_for_binary!(binary, &message_block) ⇒ Object
Instance Method Details
#check_for_binaries!(*binaries, &message_block) ⇒ Object
4 5 6 7 8 |
# File 'lib/monkey/gun/cli_helpers.rb', line 4 def check_for_binaries!(*binaries, &) binaries.each do |bin| check_for_binary!(bin.to_s, &) end end |
#check_for_binary!(binary, &message_block) ⇒ Object
10 11 12 13 14 15 |
# File 'lib/monkey/gun/cli_helpers.rb', line 10 def check_for_binary!(binary, &) bin_location = `which #{binary.to_s}` if bin_location.nil? || bin_location.empty? raise .call || '' end end |