Sha256: bc2a394879f9ffd68b7788783bd9ccf81d78db10a068dad6b65a8f19d0842d51
Contents?: true
Size: 352 Bytes
Versions: 4
Compression:
Stored size: 352 Bytes
Contents
require 'English' module HSS ## # Runs a shell command and returns the output class 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 end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
hss-1.0.1 | lib/hss/helpers/command.rb |
hss-1.0.0 | lib/hss/helpers/command.rb |
hss-0.2.11 | lib/hss/helpers/command.rb |
hss-0.2.10 | lib/helpers/command.rb |