class Jsonip::Client

Public Instance Methods

get() click to toggle source
# File lib/jsonip/client.rb, line 7
def get
  connection.get('/').body.ip
end

Private Instance Methods

connection() click to toggle source
# File lib/jsonip/client.rb, line 13
def connection
  @connection ||= Faraday.new 'http://jsonip.org' do |builder|
    builder.response :mashify
    builder.response :json
    builder.adapter Faraday.default_adapter
  end
end