class SSLyze::XML::InvalidTarget

Represents the `<invalidTarget>` XML element.

Public Class Methods

new(node) click to toggle source

Initializes the invalid target.

@param [Nokogiri::XML::Node] node

The `<invalid>` XML element.
# File lib/sslyze/xml/invalid_target.rb, line 18
def initialize(node)
  @node = node
end

Public Instance Methods

host() click to toggle source

The host component of the target.

@return [String]

# File lib/sslyze/xml/invalid_target.rb, line 38
def host
  @host ||= target.split(':',2).first
end
port() click to toggle source

The port component of the target.

@return [Integer]

@since 1.1.0

# File lib/sslyze/xml/invalid_target.rb, line 49
def port
  @port ||= target.split(':',2).last.to_i
end
target() click to toggle source

The target name.

@return [String]

@since 1.1.0

# File lib/sslyze/xml/invalid_target.rb, line 29
def target
  @target ||= @node.inner_text
end