Top Level Namespace
Constant Summary collapse
- SW_VERSION =
'0.3.2'
Instance Method Summary collapse
Instance Method Details
#abort!(message = $!) ⇒ Object
7 |
# File 'lib/sw.rb', line 7 def abort!(=$!) = abort("#$program_name: #{}") |
#warn!(message, **kw) ⇒ Object
8 |
# File 'lib/sw.rb', line 8 def warn!(, **kw) = warn("#$program_name: #{}", **kw) |
#x!(cmd, chomp: true) ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/sw.rb', line 10 def x!(cmd, chomp: true) puts "running: #{cmd}" if $VERBOSE result = Kernel.`(cmd) #` result.chomp! if chomp $?.success? or raise RuntimeError, "Command failed with exit #{$?.exitstatus}: #{cmd}", caller(1) result end |