lib/cmds/result.rb in cmds-0.0.9 vs lib/cmds/result.rb in cmds-0.1.0

- old
+ new

@@ -1,8 +1,12 @@ -class Cmds - # a {Result} is a simple data structure returned from calling {Cmds#capture} - # on a {Cmds} instance. +require 'nrser/refinements' + +using NRSER + +module Cmds + # a simple data structure returned from calling {Cmds#capture} + # on a {Cmd} instance. # # it contains the exit status code, standard output and standard error, # as well as the actual string command issued (after all substitutions). # # instances also have a few convenience methods. @@ -50,16 +54,16 @@ # # @raise [SystemCallError] if the command failed. # def assert if error? - msg = NRSER.squish <<-BLOCK + msg = <<-BLOCK.squish command `#{ @cmd }` exited with status #{ @status } and stderr #{ err.inspect } BLOCK raise SystemCallError.new msg, @status end self end # raise_error - end -end # class Cmds + end # Result +end # Cmds