システムにあるコマンドがインストールされているかどうか

FileUtils とか探したけど見当たらなかったので。

module Kernel
  def installed?(cmd)
    FileTest.executable?(`which #{cmd}`.strip)
  end
end

String#strip が肝。 irb で出力確認したら末尾に \n がついていたので、取り除かないと true が返らない、はず。