Class: Audioproxy::Config
- Inherits:
-
Object
- Object
- Audioproxy::Config
- Defined in:
- lib/audioproxy/config.rb
Overview
Process-global settings for URL generation. Assign through
Audioproxy.configure; every attribute validates at assignment so a typo
fails at boot rather than in a mailer.
Constant Summary collapse
- HEX =
/\A(?:\h\h)+\z/- OPTION_KEYS =
Option keys defaults may carry: the proxy's typed short keys and their spelled-out aliases, plus the pre-rendered
raw:escape hatch. An unrecognized key is a typo, and a typo that is silently dropped emits a valid URL for the wrong variant. ([ :raw ] + Options::KEYS + Options::ALIASES.values).uniq.freeze
Instance Attribute Summary collapse
-
#default_options ⇒ Object
Returns the value of attribute default_options.
-
#endpoint ⇒ Object
Returns the value of attribute endpoint.
-
#key ⇒ Object
Returns the value of attribute key.
-
#salt ⇒ Object
Returns the value of attribute salt.
-
#unsigned ⇒ Object
Returns the value of attribute unsigned.
Instance Method Summary collapse
-
#initialize ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
26 27 28 29 30 31 32 |
# File 'lib/audioproxy/config.rb', line 26 def initialize @endpoint = nil @key = nil @salt = nil @unsigned = false @default_options = {} end |
Instance Attribute Details
#default_options ⇒ Object
Returns the value of attribute default_options.
23 24 25 |
# File 'lib/audioproxy/config.rb', line 23 def @default_options end |
#endpoint ⇒ Object
Returns the value of attribute endpoint.
23 24 25 |
# File 'lib/audioproxy/config.rb', line 23 def endpoint @endpoint end |
#key ⇒ Object
Returns the value of attribute key.
23 24 25 |
# File 'lib/audioproxy/config.rb', line 23 def key @key end |
#salt ⇒ Object
Returns the value of attribute salt.
23 24 25 |
# File 'lib/audioproxy/config.rb', line 23 def salt @salt end |
#unsigned ⇒ Object
Returns the value of attribute unsigned.
24 25 26 |
# File 'lib/audioproxy/config.rb', line 24 def unsigned @unsigned end |