Class: Nmap::XML::TcpSequence

Inherits:
Sequence
  • Object
show all
Defined in:
lib/nmap/xml/tcp_sequence.rb

Overview

Represents a TCP sequence number.

Since:

  • 1.0.0

Instance Method Summary collapse

Methods inherited from Sequence

#description, #initialize, #values

Constructor Details

This class inherits a constructor from Nmap::XML::Sequence

Instance Method Details

#difficultyString

Returns The difficulty description from nmap.

Returns:

  • (String)

    The difficulty description from nmap

Since:

  • 0.5.0



32
33
34
# File 'lib/nmap/xml/tcp_sequence.rb', line 32

def difficulty
  @difficulty ||= @node['difficulty']
end

#indexNumeric

Returns The difficulty index from nmap.

Returns:

  • (Numeric)

    The difficulty index from nmap

Since:

  • 0.5.0



20
21
22
23
24
# File 'lib/nmap/xml/tcp_sequence.rb', line 20

def index
  @index ||= if (index_string = @node['index'])
               index_string.to_i
             end
end

#to_sString

Converts the TcpSequence class to a String.

Returns:

  • (String)

    The String form of the object.

Since:

  • 0.5.0



44
45
46
# File 'lib/nmap/xml/tcp_sequence.rb', line 44

def to_s
  "index=#{index} difficulty=#{difficulty.inspect} values=#{values.inspect}"
end