Class: Nmap::Address

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type, addr) ⇒ Address

Creates a new Address object.

Parameters:

  • type (Symbol)

    The type of the address.

  • addr (String)

    The address.



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

def initialize(type,addr)
  @type = type
  @addr = addr
end

Instance Attribute Details

#addrObject (readonly)

Address



8
9
10
# File 'lib/nmap/address.rb', line 8

def addr
  @addr
end

#typeObject (readonly)

Type of the address



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

def type
  @type
end

Instance Method Details

#to_sString

Converts the address to a String.

Returns:

  • (String)

    The address.



30
31
32
# File 'lib/nmap/address.rb', line 30

def to_s
  @addr.to_s
end