Class: Nmap::Scan

Inherits:
Struct
  • Object
show all
Defined in:
lib/nmap/scan.rb

Overview

Represents an Nmap scan.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type, protocol, services = []) ⇒ Scan

Creates a new Scan object.



19
20
21
# File 'lib/nmap/scan.rb', line 19

def initialize(type,protocol,services=[])
  super(type,protocol,services)
end

Instance Attribute Details

#protocolObject

Returns the value of attribute protocol



5
6
7
# File 'lib/nmap/scan.rb', line 5

def protocol
  @protocol
end

#servicesObject

Returns the value of attribute services



5
6
7
# File 'lib/nmap/scan.rb', line 5

def services
  @services
end

#typeObject

Returns the value of attribute type



5
6
7
# File 'lib/nmap/scan.rb', line 5

def type
  @type
end

Instance Method Details

#to_sString

Converts the scan to a String.



29
30
31
# File 'lib/nmap/scan.rb', line 29

def to_s
  "#{self.protocol} #{self.type}"
end