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.
18 19 20 |
# File 'lib/nmap/xml/script.rb', line 18 def initialize(node) @node = node end |
Instance Method Details
#data ⇒ Hash{String => Hash,Array,String}, ...
Parses the structured data within the <script>
XML element.
46 47 48 |
# File 'lib/nmap/xml/script.rb', line 46 def data @data ||= parse_table(@node) end |
#id ⇒ String
The ID of the NSE script.
27 28 29 |
# File 'lib/nmap/xml/script.rb', line 27 def id @id ||= @node['id'] end |
#output ⇒ String
The text output from the NSE script.
36 37 38 |
# File 'lib/nmap/xml/script.rb', line 36 def output @output ||= @node['output'] end |