Class: CloverSandboxSimulator::Services::BaseService

Inherits:
Object
  • Object
show all
Defined in:
lib/clover_sandbox_simulator/services/base_service.rb

Overview

Base service for all API interactions Provides HTTP client, logging, and error handling

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(config: nil) ⇒ BaseService

Returns a new instance of BaseService.



10
11
12
13
14
# File 'lib/clover_sandbox_simulator/services/base_service.rb', line 10

def initialize(config: nil)
  @config = config || CloverSandboxSimulator.configuration
  @config.validate!
  @logger = @config.logger
end

Instance Attribute Details

#configObject (readonly)

Returns the value of attribute config.



8
9
10
# File 'lib/clover_sandbox_simulator/services/base_service.rb', line 8

def config
  @config
end

#loggerObject (readonly)

Returns the value of attribute logger.



8
9
10
# File 'lib/clover_sandbox_simulator/services/base_service.rb', line 8

def logger
  @logger
end