Sha256: 451321fb48fb107e427b55c2a09cf0dc590b3dcf5530c92cc5b59cdb18c8abc7

Contents?: true

Size: 691 Bytes

Versions: 4

Compression:

Stored size: 691 Bytes

Contents

module Ridley
  class SSH
    # @author Jamie Winsor <reset@riotgames.com>
    class Response
      attr_reader :host

      attr_accessor :stdout
      attr_accessor :stderr
      attr_accessor :exit_code
      attr_accessor :exit_signal

      def initialize(host, options = {})
        @host        = host
        @stdout      = options[:stdout] || String.new
        @stderr      = options[:stderr] || String.new
        @exit_code   = options[:exit_code] || -1
        @exit_signal = options[:exit_signal] || nil
      end

      # Return true if the response was not successful
      #
      # @return [Boolean]
      def error?
        self.exit_code != 0
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
ridley-0.9.1 lib/ridley/ssh/response.rb
ridley-0.9.0 lib/ridley/ssh/response.rb
ridley-0.8.6 lib/ridley/ssh/response.rb
ridley-0.8.5 lib/ridley/ssh/response.rb