Sha256: 3c80723c60bd935c229459f1b96e14b3dce3ccaab23b0ec9792869ed74b31ac5

Contents?: true

Size: 548 Bytes

Versions: 8

Compression:

Stored size: 548 Bytes

Contents

module Nmap
  class Status

    # The state of a host
    attr_reader :state

    # The reason for the state
    attr_reader :reason

    #
    # Creates a new Status object.
    #
    # @param [Symbol] state
    #   The state of a host.
    #
    # @param [String] reason
    #   The reason for the state.
    #
    def initialize(state,reason)
      @state = state
      @reason = reason
    end

    #
    # Converts the status to a String.
    #
    # @return [String]
    #   The state.
    #
    def to_s
      @state.to_s
    end

  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
ruby-nmap-0.5.1 lib/nmap/status.rb
ruby-nmap-0.5.0 lib/nmap/status.rb
ruby-nmap-0.4.1 lib/nmap/status.rb
ruby-nmap-0.4.0 lib/nmap/status.rb
ruby-nmap-0.3.0 lib/nmap/status.rb
ruby-nmap-0.2.0 lib/nmap/status.rb
ruby-nmap-0.1.1 lib/nmap/status.rb
ruby-nmap-0.1.0 lib/nmap/status.rb