module Camara::Connection

Attributes

connection[R]

Public Instance Methods

default_options() click to toggle source
# File lib/camara/connection.rb, line 4
def default_options
  {
    request: :url_encoded,
    adapter: Faraday.default_adapter
  }
end
init() click to toggle source
# File lib/camara/connection.rb, line 11
def init
  @connection = Faraday.new(url: 'http://www.camara.gov.br') do |faraday|
    faraday.request  default_options[:request]
    faraday.adapter  default_options[:adapter]
  end
end