Class: Nmap::XML::Hop

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

Overview

Represents a hop in a traceroute.

Since:

  • 1.0.0

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#addrObject

Returns the value of attribute addr

Returns:

  • (Object)

    the current value of addr



10
11
12
# File 'lib/nmap/xml/hop.rb', line 10

def addr
  @addr
end

#hostObject

Returns the value of attribute host

Returns:

  • (Object)

    the current value of host



10
11
12
# File 'lib/nmap/xml/hop.rb', line 10

def host
  @host
end

#rttObject

Returns the value of attribute rtt

Returns:

  • (Object)

    the current value of rtt



10
11
12
# File 'lib/nmap/xml/hop.rb', line 10

def rtt
  @rtt
end

#ttlObject

Returns the value of attribute ttl

Returns:

  • (Object)

    the current value of ttl



10
11
12
# File 'lib/nmap/xml/hop.rb', line 10

def ttl
  @ttl
end

Instance Method Details

#to_sString

Converts the hop to a String.

Returns:

  • (String)

    The IP address of the hop.

Since:

  • 1.0.0



18
19
20
# File 'lib/nmap/xml/hop.rb', line 18

def to_s
  self.addr.to_s
end