class Wettr::IPAPI
Public Class Methods
call_without_ip()
click to toggle source
# File lib/wettr/ip_api.rb, line 7 def self.call_without_ip response = self.get("/json") if response["error"] puts "Encountered the following error with IPAPI.co:" puts response["reason"] puts response["message"] exit end response end
Private Class Methods
call()
click to toggle source
# File lib/wettr/ip_api.rb, line 23 def self.call response = self.class.get("#{ip}/json") end