Module: PrometheusReporter::Configuration
- Included in:
- PrometheusReporter
- Defined in:
- lib/prometheus_reporter/configuration.rb
Constant Summary collapse
- CONFIG_KEYS =
%i[prefix].freeze
Instance Method Summary collapse
Instance Method Details
#config ⇒ Object
7 8 9 |
# File 'lib/prometheus_reporter/configuration.rb', line 7 def config @config ||= OpenStruct.new end |
#configure {|config| ... } ⇒ Object
11 12 13 14 15 16 |
# File 'lib/prometheus_reporter/configuration.rb', line 11 def configure yield(config) config.to_h.each_key do |key| raise(UnknownConfig, key) unless CONFIG_KEYS.include?(key) end end |