lib/rye/rap.rb in rye-0.7.5 vs lib/rye/rap.rb in rye-0.7.6

- old
+ new

@@ -74,25 +74,24 @@ # For example, when running a command via Rye.shell, this method # is send $? which is Process::Status object. Via Rye::Box.run_command # it's just an exit code returned by Net::SSH. # Returns the exit code as an Integer. def add_exit_code(code) - code = -1 unless code + code = 0 if code.nil? if code.is_a?(Process::Status) @exit_code, @pid = code.exitstatus.to_i, code.pid else @exit_code = code.to_i end - @exit_code end def code; @exit_code; end # Returns the first element if there it's the only # one, otherwise the value of Array#to_s def to_s return self.first if self.size == 1 return "" if self.size == 0 - self + super end # Output STDOUT content to (remote) +path+ # This works like a shell redirect so the file contents are # cleared before outputting. \ No newline at end of file