Class: Dbwatcher::Services::BaseService
- Inherits:
-
Object
- Object
- Dbwatcher::Services::BaseService
- Includes:
- Logging
- Defined in:
- lib/dbwatcher/services/base_service.rb
Overview
Base class for all service objects
Provides common functionality and patterns for service objects including logging and consistent call interface.
Direct Known Subclasses
Analyzers::SessionDataProcessor, Analyzers::TableSummaryBuilder, Api::BaseApiService, DiagramAnalyzers::BaseAnalyzer
Class Method Summary collapse
-
.call(*args) ⇒ Object
Class method to create instance and call.
Instance Method Summary collapse
-
#call ⇒ Object
Perform service operation.
-
#initialize(*args) ⇒ BaseService
constructor
Initialize service.
Methods included from Logging
#debug_enabled?, #log_debug, #log_error, #log_info, #log_warn
Constructor Details
#initialize(*args) ⇒ BaseService
Initialize service
35 36 37 |
# File 'lib/dbwatcher/services/base_service.rb', line 35 def initialize(*args) # Override in subclasses end |
Class Method Details
.call(*args) ⇒ Object
Class method to create instance and call
28 29 30 |
# File 'lib/dbwatcher/services/base_service.rb', line 28 def self.call(*args) new(*args).call end |
Instance Method Details
#call ⇒ Object
Perform service operation
42 43 44 |
# File 'lib/dbwatcher/services/base_service.rb', line 42 def call raise NotImplementedError, "#{self.class} must implement #call" end |