Class: SSLyze::XML::HTTPHeaders::HTTPStrictTransportSecurity
- Inherits:
-
Object
- Object
- SSLyze::XML::HTTPHeaders::HTTPStrictTransportSecurity
- Includes:
- Attributes::Exception, Attributes::IsSupported, Types
- Defined in:
- lib/sslyze/xml/http_headers/http_strict_transport_security.rb
Overview
Represents the <httpStrictTransportSecurity/>
XML element.
Constant Summary
Constants included from Types
Instance Method Summary collapse
-
#include_sub_domains? ⇒ Boolean
Parses the
includeSubDomains
XML attribute. -
#initialize(node) ⇒ HTTPStrictTransportSecurity
constructor
Initializes the HTTPStrictTransportSecurity object.
-
#max_age ⇒ Integer?
Parses the
maxAge
XML attribute. -
#preload? ⇒ Boolean
Parses the
preload
XML attribute.
Methods included from Attributes::Exception
Methods included from Attributes::IsSupported
Constructor Details
#initialize(node) ⇒ HTTPStrictTransportSecurity
Initializes the SSLyze::XML::HTTPHeaders::HTTPStrictTransportSecurity object.
23 24 25 |
# File 'lib/sslyze/xml/http_headers/http_strict_transport_security.rb', line 23 def initialize(node) @node = node end |
Instance Method Details
#include_sub_domains? ⇒ Boolean
Parses the includeSubDomains
XML attribute.
32 33 34 |
# File 'lib/sslyze/xml/http_headers/http_strict_transport_security.rb', line 32 def include_sub_domains? Boolean[@node['includeSubDomains']] end |
#max_age ⇒ Integer?
Parses the maxAge
XML attribute.
41 42 43 44 45 |
# 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 |