Class: Nikto::XML::Statistics

Inherits:
Object
  • Object
show all
Defined in:
lib/nikto/xml/statistics.rb

Overview

Represents a statistics XML element.

Instance Method Summary collapse

Constructor Details

#initialize(node) ⇒ Statistics

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Initializes the statistics object.

Parameters:

  • node (Nokogiri::XML::Node)

    The XML node for the statistics XML element.



18
19
20
# File 'lib/nikto/xml/statistics.rb', line 18

def initialize(node)
  @node = node
end

Instance Method Details

#elapsedIntger

The number of seconds elapsed.

Returns:

  • (Intger)

    The parsed value of the elapsed attribute.



28
29
30
# File 'lib/nikto/xml/statistics.rb', line 28

def elapsed
  @elapsed ||= @node['elapsed'].to_i
end

#end_timeTime

The end-time of the scan.

Returns:

  • (Time)

    The parsed value of the endtime attribute.



58
59
60
# File 'lib/nikto/xml/statistics.rb', line 58

def end_time
  @end_time ||= Time.parse(@node['endtime'])
end

#items_foundIntger

The number of items found.

Returns:

  • (Intger)

    The parsed value of the itemsfound attribute.



38
39
40
# File 'lib/nikto/xml/statistics.rb', line 38

def items_found
  @items_found ||= @node['itemsfound'].to_i
end

#items_testedIntger

The number of items tested.

Returns:

  • (Intger)

    The parsed value of the itemstested attribute.



48
49
50
# File 'lib/nikto/xml/statistics.rb', line 48

def items_tested
  @items_tested ||= @node['itemstested'].to_i
end