Class: SecureHeaders::XFrameOptions
- Inherits:
-
Object
- Object
- SecureHeaders::XFrameOptions
- Includes:
- Constants
- Defined in:
- lib/secure_headers/headers/x_frame_options.rb
Defined Under Namespace
Modules: Constants
Constant Summary
Constants included from Constants
Constants::DEFAULT_VALUE, Constants::VALID_XFO_HEADER, Constants::XFO_HEADER_NAME
Instance Method Summary collapse
-
#initialize(config = nil) ⇒ XFrameOptions
constructor
A new instance of XFrameOptions.
- #name ⇒ Object
- #value ⇒ Object
Constructor Details
#initialize(config = nil) ⇒ XFrameOptions
Returns a new instance of XFrameOptions.
11 12 13 14 |
# File 'lib/secure_headers/headers/x_frame_options.rb', line 11 def initialize(config = nil) @config = config validate_config unless @config.nil? end |
Instance Method Details
#name ⇒ Object
16 17 18 |
# File 'lib/secure_headers/headers/x_frame_options.rb', line 16 def name XFO_HEADER_NAME end |
#value ⇒ Object
20 21 22 23 24 25 26 27 28 29 |
# File 'lib/secure_headers/headers/x_frame_options.rb', line 20 def value case @config when NilClass DEFAULT_VALUE when String @config else @config[:value] end end |