module Gruf::Sentry::Configuration
Configuration
module for gruf-sentry
Constants
- VALID_CONFIG_KEYS
Public Class Methods
extended(base)
click to toggle source
Whenever this is extended into a class, setup the defaults
# File lib/gruf/sentry/configuration.rb, line 38 def self.extended(base) base.reset end
Public Instance Methods
configure() { |self| ... }
click to toggle source
Yield self for ruby-style initialization
@yields [Gruf::Sentry::Configuration] @return [Gruf::Sentry::Configuration]
# File lib/gruf/sentry/configuration.rb, line 48 def configure yield self end
options()
click to toggle source
Return the current configuration options as a Hash
@return [Hash]
# File lib/gruf/sentry/configuration.rb, line 57 def options opts = {} VALID_CONFIG_KEYS.each_key do |k| opts.merge!(k => send(k)) end opts end
reset()
click to toggle source
Set the default configuration onto the extended class
@return [Hash] options The reset options hash
# File lib/gruf/sentry/configuration.rb, line 70 def reset VALID_CONFIG_KEYS.each do |k, v| send("#{k}=".to_sym, v) end options end