Method: BooticClient::Client#initialize

Defined in:
lib/bootic_client/client.rb

#initialize(options = {}, &block) ⇒ Client

Returns a new instance of Client.



16
17
18
19
20
21
22
23
24
25
26
# File 'lib/bootic_client/client.rb', line 16

def initialize(options = {}, &block)
  @options = {
    logging: false,
    faraday_adapter: [:net_http_persistent],
    user_agent: USER_AGENT
  }.merge(options.dup)

  @options[:cache_store] = @options[:cache_store] || Faraday::HttpCache::MemoryStore.new

  conn &block if block_given?
end