Class: Dial::Configuration
- Inherits:
-
Object
- Object
- Dial::Configuration
- Defined in:
- lib/dial/configuration.rb
Instance Method Summary collapse
- #freeze ⇒ Object
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/dial/configuration.rb', line 13 def initialize = { enabled: true, force_param: FORCE_PARAM, sampling_percentage: ::Rails.env.development? ? SAMPLING_PERCENTAGE_DEV : SAMPLING_PERCENTAGE_PROD, storage: Storage::FileAdapter, storage_options: { ttl: STORAGE_TTL }, content_security_policy_nonce: -> env, _headers { env[NONCE] || EMPTY_NONCE }, toggle_shortcut_keys: TOGGLE_SHORTCUT_KEYS, vernier_interval: VERNIER_INTERVAL, vernier_allocation_interval: VERNIER_ALLOCATION_INTERVAL, prosopite_ignore_queries: PROSOPITE_IGNORE_QUERIES, } .keys.each do |key| define_singleton_method key do [key] end define_singleton_method "#{key}=" do |value| [key] = value end end end |
Instance Method Details
#freeze ⇒ Object
38 39 40 41 42 |
# File 'lib/dial/configuration.rb', line 38 def freeze .freeze super end |