Sha256: de0276e5fa627dfff31941861727101981508403315a8ad2f6bbfccb06153931

Contents?: true

Size: 651 Bytes

Versions: 8

Compression:

Stored size: 651 Bytes

Contents

module Nmap
  #
  # Represents an Nmap scan.
  #
  class Scan < Struct.new(:type, :protocol, :services)

    #
    # Creates a new Scan object.
    #
    # @param [Symbol] type
    #   The type of the scan.
    #
    # @param [Symbol] protocol
    #   The protocol used for the scan.
    #
    # @param [Array<Integer, Rage>] services
    #   The port numbers scanned.
    #
    def initialize(type,protocol,services=[])
      super(type,protocol,services)
    end

    #
    # Converts the scan to a String.
    #
    # @return [String]
    #   The String form of the scan.
    #
    def to_s
      "#{self.protocol} #{self.type}"
    end

  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
ruby-nmap-0.10.0 lib/nmap/scan.rb
ruby-nmap-0.9.3 lib/nmap/scan.rb
ruby-nmap-0.9.2 lib/nmap/scan.rb
ruby-nmap-0.9.1 lib/nmap/scan.rb
ruby-nmap-0.9.0 lib/nmap/scan.rb
ruby-nmap-0.8.0 lib/nmap/scan.rb
ruby-nmap-0.7.0 lib/nmap/scan.rb
ruby-nmap-0.6.0 lib/nmap/scan.rb