Sha256: 9de945787b319419cf4a3219e8c30c701bb434b2466ab7d83bfe7c783718c843

Contents?: true

Size: 799 Bytes

Versions: 1

Compression:

Stored size: 799 Bytes

Contents

require 'nmap/sequence'

module Nmap
  #
  # Represents a TCP sequence number.
  #
  # @since 0.5.0
  #
  class TcpSequence < Sequence

    #
    # @return [Numeric]
    #   The difficulty index from nmap
    #
    # @since 0.5.0
    #   
    def index
      @index ||= if (index_string = @node['index'])
                   index_string.to_i
                 end
    end

    #
    # @return [String]
    #   The difficulty description from nmap
    #
    # @since 0.5.0
    #
    def difficulty
      @node['difficulty']
    end

    #
    # Converts the TcpSequence class to a String.
    #
    # @return [String]
    #   The String form of the object.
    #
    # @since 0.5.0
    #
    def to_s
      "index=#{index} difficulty=#{difficulty.inspect} values=#{values.inspect}"
    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ruby-nmap-0.6.0 lib/nmap/tcp_sequence.rb