Class: SecureHeaders::CookiesConfig
- Inherits:
-
Object
- Object
- SecureHeaders::CookiesConfig
- Defined in:
- lib/secure_headers/utils/cookies_config.rb
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
Instance Method Summary collapse
-
#initialize(config) ⇒ CookiesConfig
constructor
A new instance of CookiesConfig.
- #validate! ⇒ Object
Constructor Details
#initialize(config) ⇒ CookiesConfig
Returns a new instance of CookiesConfig.
7 8 9 |
# File 'lib/secure_headers/utils/cookies_config.rb', line 7 def initialize(config) @config = config end |
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
5 6 7 |
# File 'lib/secure_headers/utils/cookies_config.rb', line 5 def config @config end |
Instance Method Details
#validate! ⇒ Object
11 12 13 14 15 16 17 18 |
# File 'lib/secure_headers/utils/cookies_config.rb', line 11 def validate! return if config.nil? || config == SecureHeaders::OPT_OUT validate_config! validate_secure_config! unless config[:secure].nil? validate_httponly_config! unless config[:httponly].nil? validate_samesite_config! unless config[:samesite].nil? end |