Sha256: 382312eb430205275731ecfb1e1ff7d7bb52c58f51b3919f487f207e5595383e

Contents?: true

Size: 693 Bytes

Versions: 13

Compression:

Stored size: 693 Bytes

Contents

module Ridley
  class SSH
    # @author Jamie Winsor <jamie@vialstudios.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

13 entries across 13 versions & 1 rubygems

Version Path
ridley-0.8.3 lib/ridley/ssh/response.rb
ridley-0.8.2 lib/ridley/ssh/response.rb
ridley-0.8.1 lib/ridley/ssh/response.rb
ridley-0.8.0 lib/ridley/ssh/response.rb
ridley-0.7.0 lib/ridley/ssh/response.rb
ridley-0.7.0.rc4 lib/ridley/ssh/response.rb
ridley-0.7.0.rc3 lib/ridley/ssh/response.rb
ridley-0.7.0.rc1 lib/ridley/ssh/response.rb
ridley-0.7.0.beta lib/ridley/ssh/response.rb
ridley-0.6.3 lib/ridley/ssh/response.rb
ridley-0.6.2 lib/ridley/ssh/response.rb
ridley-0.6.1 lib/ridley/ssh/response.rb
ridley-0.6.0 lib/ridley/ssh/response.rb