class SSLyze::XML::HTTPHeaders::HTTPStrictTransportSecurity

Represents the `<httpStrictTransportSecurity/>` XML element.

@since 1.0.0

Public Class Methods

new(node) click to toggle source

Initializes the {HTTPStrictTransportSecurity} object.

# File lib/sslyze/xml/http_headers/http_strict_transport_security.rb, line 23
def initialize(node)
  @node = node
end

Public Instance Methods

include_sub_domains?() click to toggle source

Parses the `includeSubDomains` XML attribute.

@return [Boolean]

# File lib/sslyze/xml/http_headers/http_strict_transport_security.rb, line 32
def include_sub_domains?
  Boolean[@node['includeSubDomains']]
end
max_age() click to toggle source

Parses the `maxAge` XML attribute.

@return [Integer, nil]

# File lib/sslyze/xml/http_headers/http_strict_transport_security.rb, line 41
def max_age
  @max_age ||= if (value = @node['maxAge'])
                 value.to_i
               end
end
preload?() click to toggle source

Parses the `preload` XML attribute.

@return [Boolean]

# File lib/sslyze/xml/http_headers/http_strict_transport_security.rb, line 52
def preload?
  Boolean[@node['preload']]
end