Method: Lowdown::Client.client_with_connection

Defined in:
lib/lowdown/client.rb

.client_with_connection(connection, certificate:) ⇒ Client

Creates a Client configured with the app_bundle_id as its default_topic, in case the Certificate represents a Universal Certificate.

Parameters:

  • connection (Connection, Celluloid::Supervision::Container::Pool<Connection>)

    a single Connection or a pool of Connection actors configured to connect to the remote service.

  • certificate (Certificate)

    a configured Certificate.

Returns:

  • (Client)

    a new instance of Client.

[View source]

112
113
114
# File 'lib/lowdown/client.rb', line 112

def self.client_with_connection(connection, certificate:)
  new(connection: connection, default_topic: certificate.universal? ? certificate.topics.first : nil)
end