Class: SidekiqVigil::Config::NotifierDefinition
- Inherits:
-
Object
- Object
- SidekiqVigil::Config::NotifierDefinition
- Defined in:
- lib/sidekiq_vigil/config.rb
Constant Summary collapse
- SECRET_KEYS =
%i[webhook_url routes bot_token url].freeze
Instance Attribute Summary collapse
-
#klass ⇒ Object
readonly
Returns the value of attribute klass.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
-
#initialize(name:, klass:, options:) ⇒ NotifierDefinition
constructor
A new instance of NotifierDefinition.
- #inspect ⇒ Object
Constructor Details
#initialize(name:, klass:, options:) ⇒ NotifierDefinition
Returns a new instance of NotifierDefinition.
16 17 18 19 20 |
# File 'lib/sidekiq_vigil/config.rb', line 16 def initialize(name:, klass:, options:) @name = name @klass = klass @options = end |
Instance Attribute Details
#klass ⇒ Object (readonly)
Returns the value of attribute klass.
14 15 16 |
# File 'lib/sidekiq_vigil/config.rb', line 14 def klass @klass end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
14 15 16 |
# File 'lib/sidekiq_vigil/config.rb', line 14 def name @name end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
14 15 16 |
# File 'lib/sidekiq_vigil/config.rb', line 14 def @options end |
Instance Method Details
#inspect ⇒ Object
22 23 24 25 26 27 28 |
# File 'lib/sidekiq_vigil/config.rb', line 22 def inspect = .transform_values.with_index do |value, _index| value.is_a?(Hash) ? value.transform_values { "[FILTERED]" } : value end SECRET_KEYS.each { |key| [key] = "[FILTERED]" if .key?(key) } "#<#{self.class} name=#{name.inspect} options=#{.inspect}>" end |