Class: GeoIP::City

Inherits:
Struct
  • Object
show all
Defined in:
lib/geoip.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#area_codeObject

Returns the value of attribute area_code



115
116
117
# File 'lib/geoip.rb', line 115

def area_code
  @area_code
end

#cityObject

Returns the value of attribute city



115
116
117
# File 'lib/geoip.rb', line 115

def city
  @city
end

#continent_codeObject

Returns the value of attribute continent_code



115
116
117
# File 'lib/geoip.rb', line 115

def continent_code
  @continent_code
end

#country_codeObject

Returns the value of attribute country_code



115
116
117
# File 'lib/geoip.rb', line 115

def country_code
  @country_code
end

#country_code3Object

Returns the value of attribute country_code3



115
116
117
# File 'lib/geoip.rb', line 115

def country_code3
  @country_code3
end

#country_nameObject

Returns the value of attribute country_name



115
116
117
# File 'lib/geoip.rb', line 115

def country_name
  @country_name
end

#ipObject

Returns the value of attribute ip



115
116
117
# File 'lib/geoip.rb', line 115

def ip
  @ip
end

#latitudeObject

Returns the value of attribute latitude



115
116
117
# File 'lib/geoip.rb', line 115

def latitude
  @latitude
end

#longitudeObject

Returns the value of attribute longitude



115
116
117
# File 'lib/geoip.rb', line 115

def longitude
  @longitude
end

#metrocodeObject

Returns the value of attribute metrocode



115
116
117
# File 'lib/geoip.rb', line 115

def metrocode
  @metrocode
end

#region_codeObject

Returns the value of attribute region_code



115
116
117
# File 'lib/geoip.rb', line 115

def region_code
  @region_code
end

#requestObject

Returns the value of attribute request



115
116
117
# File 'lib/geoip.rb', line 115

def request
  @request
end

#timezoneObject

Returns the value of attribute timezone



115
116
117
# File 'lib/geoip.rb', line 115

def timezone
  @timezone
end

#zipcodeObject

Returns the value of attribute zipcode



115
116
117
# File 'lib/geoip.rb', line 115

def zipcode
  @zipcode
end

Instance Method Details

#to_hashObject



118
119
120
# File 'lib/geoip.rb', line 118

def to_hash
  Hash[each_pair.to_a]
end