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