Sha256: 9d3217adc4b687848dcea7a36957663001c6c1557a69bebba523b94611c6fe92
Contents?: true
Size: 319 Bytes
Versions: 3
Compression:
Stored size: 319 Bytes
Contents
require 'English' ## # Runs a shell command and returns the output class HSS::Parser private def command(input) result = IO.popen(input) { |cmd| cmd.read.chomp } fail "Command failed: #{input}" unless $CHILD_STATUS == 0 result rescue Errno::ENOENT raise "Command not found: #{input}" end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
hss-0.2.8 | lib/helpers/command.rb |
hss-0.2.6 | lib/helpers/command.rb |
hss-0.2.5 | lib/helpers/command.rb |