Sha256: c7534091bce565819c55ca4599aa10475d3f44615359891d7572d7f21c2e6b46

Contents?: true

Size: 815 Bytes

Versions: 7

Compression:

Stored size: 815 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
      @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

7 entries across 7 versions & 1 rubygems

Version Path
ruby-nmap-0.10.0 lib/nmap/tcp_sequence.rb
ruby-nmap-0.9.3 lib/nmap/tcp_sequence.rb
ruby-nmap-0.9.2 lib/nmap/tcp_sequence.rb
ruby-nmap-0.9.1 lib/nmap/tcp_sequence.rb
ruby-nmap-0.9.0 lib/nmap/tcp_sequence.rb
ruby-nmap-0.8.0 lib/nmap/tcp_sequence.rb
ruby-nmap-0.7.0 lib/nmap/tcp_sequence.rb