Class: Microclimate::Base
- Inherits:
-
Object
- Object
- Microclimate::Base
- Defined in:
- lib/microclimate/base.rb
Direct Known Subclasses
Instance Method Summary collapse
Instance Method Details
#connection ⇒ Object
5 6 7 8 9 10 11 |
# File 'lib/microclimate/base.rb', line 5 def connection @connection ||= ::Faraday.new(:url => host) 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 end end |
#host ⇒ Object
13 14 15 |
# File 'lib/microclimate/base.rb', line 13 def host "https://codeclimate.com" end |