Class: PublicIp::Service::WtfIsMyIp

Inherits:
JsonType show all
Defined in:
lib/public_ip/service/wtf_is_my_ip.rb

Instance Attribute Summary

Attributes inherited from Simple

#headers, #uri

Class Method Summary collapse

Methods inherited from JsonType

extract_ip

Methods included from Registrable

#inherited

Methods inherited from Simple

headers, ip, perform_request, symbol

Class Method Details

.parse_json(json_data) ⇒ Object



8
9
10
# File 'lib/public_ip/service/wtf_is_my_ip.rb', line 8

def self.parse_json(json_data)
  json_data['YourFuckingIPAddress']
end

.uriObject



4
5
6
# File 'lib/public_ip/service/wtf_is_my_ip.rb', line 4

def self.uri
  URI('http://wtfismyip.com/json')
end