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