Class: Nmap::XML::Script
- Inherits:
-
Object
- Object
- Nmap::XML::Script
- Defined in:
- lib/nmap/xml/script.rb
Overview
Wraps a script XML element.
Instance Method Summary collapse
-
#data ⇒ Hash{String => Hash,Array,String}, ...
Parses the structured data within the
<script>XML element. -
#id ⇒ String
The ID of the NSE script.
-
#initialize(node) ⇒ Script
constructor
Initializes a new Script object.
-
#output ⇒ String
The text output from the NSE script.
Constructor Details
#initialize(node) ⇒ Script
Initializes a new Script object.
16 17 18 |
# File 'lib/nmap/xml/script.rb', line 16 def initialize(node) @node = node end |
Instance Method Details
#data ⇒ Hash{String => Hash,Array,String}, ...
Parses the structured data within the <script> XML element.
44 45 46 |
# File 'lib/nmap/xml/script.rb', line 44 def data @data ||= parse_table(@node) end |
#id ⇒ String
The ID of the NSE script.
25 26 27 |
# File 'lib/nmap/xml/script.rb', line 25 def id @id ||= @node['id'] end |
#output ⇒ String
The text output from the NSE script.
34 35 36 |
# File 'lib/nmap/xml/script.rb', line 34 def output @output ||= @node['output'] end |