class Labelary::Client
Public Class Methods
connection(*args)
click to toggle source
# File lib/labelary/client.rb, line 3 def self.connection(*args) self.new(*args).connection end
Public Instance Methods
connection()
click to toggle source
# File lib/labelary/client.rb, line 7 def connection @connection ||= Faraday.new(url: config.url) do |faraday| faraday.request :multipart faraday.response :json, content_type: /\bjson$/ faraday.adapter config.http_adapter end end
Private Instance Methods
config()
click to toggle source
# File lib/labelary/client.rb, line 18 def config @config ||= Labelary.configuration end