Class: Nmap::Hop

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

Overview

Represents a hop in a traceroute.

Since:

  • 0.7.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



7
8
9
# File 'lib/nmap/hop.rb', line 7

def addr
  @addr
end

#hostObject

Returns the value of attribute host

Returns:

  • (Object)

    the current value of host



7
8
9
# File 'lib/nmap/hop.rb', line 7

def host
  @host
end

#rttObject

Returns the value of attribute rtt

Returns:

  • (Object)

    the current value of rtt



7
8
9
# File 'lib/nmap/hop.rb', line 7

def rtt
  @rtt
end

#ttlObject

Returns the value of attribute ttl

Returns:

  • (Object)

    the current value of ttl



7
8
9
# File 'lib/nmap/hop.rb', line 7

def ttl
  @ttl
end

Instance Method Details

#to_sString

Converts the hop to a String.

Returns:

  • (String)

    The IP address of the hop.

Since:

  • 0.7.0



15
16
17
# File 'lib/nmap/hop.rb', line 15

def to_s
  self.addr.to_s
end