Class: Findbug::AlertConfiguration
- Inherits:
-
Object
- Object
- Findbug::AlertConfiguration
- Defined in:
- lib/findbug/configuration.rb
Overview
Nested class for alert configuration
ALERT CHANNELS ARE DB-DRIVEN
Alert channels (email, Slack, Discord, webhook) are stored in the database and managed via the dashboard UI at /findbug/alerts.
This class only holds global alert settings like throttle_period.
Instance Attribute Summary collapse
-
#throttle_period ⇒ Object
Returns the value of attribute throttle_period.
Instance Method Summary collapse
- #any_enabled? ⇒ Boolean
- #channel(_name) ⇒ Object
- #discord ⇒ Object
-
#email ⇒ Object
Deprecated DSL methods — kept for backward compatibility so existing initializers don’t raise NoMethodError on upgrade.
- #enabled_channels ⇒ Object
-
#initialize ⇒ AlertConfiguration
constructor
A new instance of AlertConfiguration.
- #slack ⇒ Object
- #webhook ⇒ Object
Constructor Details
#initialize ⇒ AlertConfiguration
Returns a new instance of AlertConfiguration.
324 325 326 |
# File 'lib/findbug/configuration.rb', line 324 def initialize @throttle_period = 300 # 5 minutes default end |
Instance Attribute Details
#throttle_period ⇒ Object
Returns the value of attribute throttle_period.
322 323 324 |
# File 'lib/findbug/configuration.rb', line 322 def throttle_period @throttle_period end |
Instance Method Details
#any_enabled? ⇒ Boolean
337 |
# File 'lib/findbug/configuration.rb', line 337 def any_enabled? = false |
#channel(_name) ⇒ Object
335 |
# File 'lib/findbug/configuration.rb', line 335 def channel(_name) = nil |
#discord ⇒ Object
333 |
# File 'lib/findbug/configuration.rb', line 333 def discord(**) = nil |
#email ⇒ Object
Deprecated DSL methods — kept for backward compatibility so existing initializers don’t raise NoMethodError on upgrade. These are no-ops; alert channels are now configured via the dashboard UI.
331 |
# File 'lib/findbug/configuration.rb', line 331 def email(**) = nil |
#enabled_channels ⇒ Object
336 |
# File 'lib/findbug/configuration.rb', line 336 def enabled_channels = {} |
#slack ⇒ Object
332 |
# File 'lib/findbug/configuration.rb', line 332 def slack(**) = nil |
#webhook ⇒ Object
334 |
# File 'lib/findbug/configuration.rb', line 334 def webhook(**) = nil |