Class: Nikto::XML::Item

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

Instance Method Summary collapse

Constructor Details

#initialize(node) ⇒ Item

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 item object.

Parameters:

  • node (Nokogiri::XML::Node)

    The XML node for the item XML element.



13
14
15
# File 'lib/nikto/xml/item.rb', line 13

def initialize(node)
  @node = node
end

Instance Method Details

#descriptionString

The text of the description child element.

Returns:

  • (String)


22
23
24
# File 'lib/nikto/xml/item.rb', line 22

def description
  @description ||= @node.at_xpath('description').inner_text
end

The text of the iplink child element.

Returns:

  • (String)


49
50
51
# File 'lib/nikto/xml/item.rb', line 49

def ip_link
  @ip_link ||= @node.at_xpath('iplink').inner_text
end

The text of the namelink child element.

Returns:

  • (String)


40
41
42
# File 'lib/nikto/xml/item.rb', line 40

def name_link
  @name_link ||= @node.at_xpath('namelink').inner_text
end

#uriString

The text of the uri child element.

Returns:

  • (String)


31
32
33
# File 'lib/nikto/xml/item.rb', line 31

def uri
  @uri ||= @node.at_xpath('uri').inner_text
end