Class: SSLyze::XML::InvalidTarget
- Inherits:
-
Object
- Object
- SSLyze::XML::InvalidTarget
- Includes:
- Attributes::Error
- Defined in:
- lib/sslyze/xml/invalid_target.rb
Overview
Represents the <invalidTarget>
XML element.
Instance Method Summary collapse
-
#host ⇒ String
The host component of the target.
-
#initialize(node) ⇒ InvalidTarget
constructor
Initializes the invalid target.
-
#port ⇒ Integer
The port component of the target.
-
#target ⇒ String
The target name.
Methods included from Attributes::Error
Constructor Details
#initialize(node) ⇒ InvalidTarget
Initializes the invalid target.
18 19 20 |
# File 'lib/sslyze/xml/invalid_target.rb', line 18 def initialize(node) @node = node end |
Instance Method Details
#host ⇒ String
The host component of the target.
38 39 40 |
# File 'lib/sslyze/xml/invalid_target.rb', line 38 def host @host ||= target.split(':',2).first end |
#port ⇒ Integer
The port component of the target.
49 50 51 |
# File 'lib/sslyze/xml/invalid_target.rb', line 49 def port @port ||= target.split(':',2).last.to_i end |
#target ⇒ String
The target name.
29 30 31 |
# File 'lib/sslyze/xml/invalid_target.rb', line 29 def target @target ||= @node.inner_text end |