class Bond::Connection

Attributes

connection[RW]

Public Class Methods

connection() click to toggle source

Create instances of connection object to ensure thread safety @return [Faraday] connection

# File lib/bond/connection.rb, line 10
def connection
  new.connection
end
new() click to toggle source
# File lib/bond/connection.rb, line 15
def initialize
  connection = Faraday.new(url: Bond::API_URL)
  connection.basic_auth(Bond.api_key, nil)
  @connection = connection
end