Class: Rack::Thumb::Proxy::Configuration
- Inherits:
-
Object
- Object
- Rack::Thumb::Proxy::Configuration
- Defined in:
- lib/rack-thumb-proxy/configuration.rb
Instance Attribute Summary collapse
-
#cache_control_headers ⇒ Object
readonly
Returns the value of attribute cache_control_headers.
-
#option_labels ⇒ Object
readonly
Returns the value of attribute option_labels.
Instance Method Summary collapse
- #hash_signatures_in_use? ⇒ Boolean
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #key_length(new_key_length = nil) ⇒ Object
- #mount_point(new_mount_point = nil) ⇒ Object
- #option_label(label, options) ⇒ Object
- #secret(new_secret = nil) ⇒ Object
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
10 11 12 |
# File 'lib/rack-thumb-proxy/configuration.rb', line 10 def initialize initialize_defaults! end |
Instance Attribute Details
#cache_control_headers ⇒ Object (readonly)
Returns the value of attribute cache_control_headers.
7 8 9 |
# File 'lib/rack-thumb-proxy/configuration.rb', line 7 def cache_control_headers @cache_control_headers end |
#option_labels ⇒ Object (readonly)
Returns the value of attribute option_labels.
8 9 10 |
# File 'lib/rack-thumb-proxy/configuration.rb', line 8 def option_labels @option_labels end |
Instance Method Details
#hash_signatures_in_use? ⇒ Boolean
33 34 35 |
# File 'lib/rack-thumb-proxy/configuration.rb', line 33 def hash_signatures_in_use? !!@secret end |
#key_length(new_key_length = nil) ⇒ Object
19 20 21 22 |
# File 'lib/rack-thumb-proxy/configuration.rb', line 19 def key_length(new_key_length = nil) @key_length = new_key_length if new_key_length return @key_length end |
#mount_point(new_mount_point = nil) ⇒ Object
14 15 16 17 |
# File 'lib/rack-thumb-proxy/configuration.rb', line 14 def mount_point(new_mount_point = nil) @mount_point = new_mount_point if new_mount_point return @mount_point end |
#option_label(label, options) ⇒ Object
29 30 31 |
# File 'lib/rack-thumb-proxy/configuration.rb', line 29 def option_label(label, ) option_labels.merge!(label.to_sym => ) end |
#secret(new_secret = nil) ⇒ Object
24 25 26 27 |
# File 'lib/rack-thumb-proxy/configuration.rb', line 24 def secret(new_secret = nil) @secret = new_secret if new_secret return @secret end |