Module: PriceHubble::EntityConcern::Client
- Extended by:
- ActiveSupport::Concern
- Included in:
- BaseEntity
- Defined in:
- lib/price_hubble/entity/concern/client.rb
Overview
Allow entities to define their low level HTTP client to use.
Class Method Summary collapse
-
.client(name) ⇒ Object
Allows an entity to configure the client it depends on.
Instance Method Summary collapse
-
#client ⇒ Mixed
Get the cached low level client instance.
Class Method Details
.client(name) ⇒ Object
Allows an entity to configure the client it depends on.
25 26 27 |
# File 'lib/price_hubble/entity/concern/client.rb', line 25 def client(name) self.client_class = PriceHubble.client(name).class end |
Instance Method Details
#client ⇒ Mixed
Get the cached low level client instance.
16 17 18 |
# File 'lib/price_hubble/entity/concern/client.rb', line 16 def client @client ||= client_class.new end |