Class: Nmap::Sequence
- Inherits:
-
Object
- Object
- Nmap::Sequence
- Defined in:
- lib/nmap/sequence.rb
Overview
Base class for all Sequence classes.
Direct Known Subclasses
Instance Method Summary collapse
-
#description ⇒ String
The description of the sequence.
-
#initialize(node) ⇒ Sequence
constructor
Creates a new sequence object.
-
#values ⇒ Array<Numeric>
The values within the sequence.
Constructor Details
#initialize(node) ⇒ Sequence
Creates a new sequence object.
17 18 19 |
# File 'lib/nmap/sequence.rb', line 17 def initialize(node) @node = node end |
Instance Method Details
#description ⇒ String
The description of the sequence.
29 30 31 |
# File 'lib/nmap/sequence.rb', line 29 def description @description ||= @node['class'] end |
#values ⇒ Array<Numeric>
The values within the sequence.
41 42 43 44 45 46 47 |
# File 'lib/nmap/sequence.rb', line 41 def values @values ||= if @node['values'] @node['values'].split(',').map { |value| value.to_i(16) } else [] end end |