Class: Outhad::Integrations::Service
- Inherits:
-
Object
- Object
- Outhad::Integrations::Service
- Defined in:
- lib/outhad/integrations/service.rb
Class Method Summary collapse
- .config ⇒ Object
- .connector_class(connector_type, connector_name) ⇒ Object
- .connectors ⇒ Object
- .exception_reporter ⇒ Object
- .logger ⇒ Object
Instance Method Summary collapse
-
#initialize {|self.class.config| ... } ⇒ Service
constructor
A new instance of Service.
Constructor Details
#initialize {|self.class.config| ... } ⇒ Service
Returns a new instance of Service.
6 7 8 |
# File 'lib/outhad/integrations/service.rb', line 6 def initialize yield(self.class.config) if block_given? end |
Class Method Details
.config ⇒ Object
35 36 37 |
# File 'lib/outhad/integrations/service.rb', line 35 def config @config ||= Config.new end |
.connector_class(connector_type, connector_name) ⇒ Object
21 22 23 24 25 |
# File 'lib/outhad/integrations/service.rb', line 21 def connector_class(connector_type, connector_name) Object.const_get( "Outhad::Integrations::#{connector_type}::#{connector_name}::Client" ) end |
.connectors ⇒ Object
10 11 12 13 14 15 16 17 18 19 |
# File 'lib/outhad/integrations/service.rb', line 10 def connectors { source: build_connectors( ENABLED_SOURCES, "Source" ), destination: build_connectors( ENABLED_DESTINATIONS, "Destination" ) } end |
.exception_reporter ⇒ Object
31 32 33 |
# File 'lib/outhad/integrations/service.rb', line 31 def exception_reporter config.exception_reporter end |
.logger ⇒ Object
27 28 29 |
# File 'lib/outhad/integrations/service.rb', line 27 def logger config.logger || default_logger end |