Class: FlowcommerceSpree::LoggingHttpHandler

Inherits:
Io::Flow::V0::HttpClient::DefaultHttpHandler
  • Object
show all
Defined in:
lib/flowcommerce_spree/logging_http_handler.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(logger: FlowcommerceSpree.logger) ⇒ LoggingHttpHandler

Returns a new instance of LoggingHttpHandler.



7
8
9
# File 'lib/flowcommerce_spree/logging_http_handler.rb', line 7

def initialize(logger: FlowcommerceSpree.logger)
  @logger = logger
end

Instance Attribute Details

#http_clientObject (readonly)

Returns the value of attribute http_client.



5
6
7
# File 'lib/flowcommerce_spree/logging_http_handler.rb', line 5

def http_client
  @http_client
end

#loggerObject (readonly)

Returns the value of attribute logger.



5
6
7
# File 'lib/flowcommerce_spree/logging_http_handler.rb', line 5

def logger
  @logger
end

Instance Method Details

#instance(base_uri, _path) ⇒ Object



11
12
13
# File 'lib/flowcommerce_spree/logging_http_handler.rb', line 11

def instance(base_uri, _path)
  @http_client = LoggingHttpClient.new(base_uri, logger: @logger)
end