Sha256: b58e53744791ea1a42e4766a873e31d321bf46787e436d9edaadfd066c82ecc0

Contents?: true

Size: 458 Bytes

Versions: 4

Compression:

Stored size: 458 Bytes

Contents

module Parkwhiz
  def self.connection=(connection)
    @connection = connection
  end

  def self.connection
    @connection ||= Faraday.new(url: 'http://api.parkwhiz.com') do |faraday|
      faraday.request  :url_encoded             # form-encode POST params
      faraday.response :logger                  # log requests to STDOUT
      faraday.adapter  Faraday.default_adapter  # make requests with Net::HTTP
      faraday.response :json
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
parkwhiz-0.4.0 lib/parkwhiz/connection.rb
parkwhiz-0.3.0 lib/parkwhiz/connection.rb
parkwhiz-0.2.0 lib/parkwhiz/connection.rb
parkwhiz-0.1.0 lib/parkwhiz/connection.rb