Class: SmokeDetector::Providers::Provider
- Inherits:
-
Object
- Object
- SmokeDetector::Providers::Provider
- Defined in:
- lib/smoke_detector/providers/provider.rb
Instance Attribute Summary collapse
-
#client_settings ⇒ Object
readonly
Returns the value of attribute client_settings.
-
#controller_proc ⇒ Object
Returns the value of attribute controller_proc.
Instance Method Summary collapse
- #alert(exception, options = {}) ⇒ Object
- #client_monitoring_code ⇒ Object
- #default_client_settings ⇒ Object
-
#initialize(api_key, client_settings = {}, settings = {}) ⇒ Provider
constructor
A new instance of Provider.
- #message(message, options = {}) ⇒ Object
Constructor Details
#initialize(api_key, client_settings = {}, settings = {}) ⇒ Provider
Returns a new instance of Provider.
7 8 9 10 |
# File 'lib/smoke_detector/providers/provider.rb', line 7 def initialize(api_key, client_settings = {}, settings = {}) @client_settings = client_settings || {} @client_api_key = @client_settings[:api_key] end |
Instance Attribute Details
#client_settings ⇒ Object (readonly)
Returns the value of attribute client_settings.
5 6 7 |
# File 'lib/smoke_detector/providers/provider.rb', line 5 def client_settings @client_settings end |
#controller_proc ⇒ Object
Returns the value of attribute controller_proc.
4 5 6 |
# File 'lib/smoke_detector/providers/provider.rb', line 4 def controller_proc @controller_proc end |
Instance Method Details
#alert(exception, options = {}) ⇒ Object
12 13 14 |
# File 'lib/smoke_detector/providers/provider.rb', line 12 def alert(exception, = {}) raise NotImplementedError end |
#client_monitoring_code ⇒ Object
20 21 22 |
# File 'lib/smoke_detector/providers/provider.rb', line 20 def client_monitoring_code '' end |
#default_client_settings ⇒ Object
24 25 26 |
# File 'lib/smoke_detector/providers/provider.rb', line 24 def default_client_settings {} end |
#message(message, options = {}) ⇒ Object
16 17 18 |
# File 'lib/smoke_detector/providers/provider.rb', line 16 def (, = {}) raise NotImplementedError end |