class EasyGeoIP::GeoData
Attributes
city[R]
continent_code[R]
country[R]
country_code[R]
ip[R]
isp[R]
latitude[R]
longitude[R]
postal_code[R]
region[R]
region_code[R]
time_zone[R]
Public Class Methods
new(attributes = {})
click to toggle source
# File lib/easy_geoip/geo_data.rb, line 7 def initialize(attributes = {}) @ip = attributes[:ip] @country = attributes[:country] @country_code = attributes[:country_code] @city = attributes[:city] @region = attributes[:region] @region_code = attributes[:region_code] @postal_code = attributes[:postal_code] @continent_code = attributes[:continent_code] @latitude = attributes[:latitude] @longitude = attributes[:longitude] @time_zone = attributes[:time_zone] @isp = attributes[:isp] end
Public Instance Methods
to_hash()
click to toggle source
# File lib/easy_geoip/geo_data.rb, line 22 def to_hash { ip: ip, country: country, country_code: country_code, city: city, region: region, region_code: region_code, postal_code: postal_code, continent_code: continent_code, latitude: latitude, longitude: longitude, time_zone: time_zone, isp: isp } end