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

Returns:

  • (Object)

    the current value of area_code



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

def area_code
  @area_code
end

#city_nameObject

Returns the value of attribute city_name

Returns:

  • (Object)

    the current value of city_name



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

def city_name
  @city_name
end

#continent_codeObject

Returns the value of attribute continent_code

Returns:

  • (Object)

    the current value of continent_code



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

def continent_code
  @continent_code
end

#country_code2Object

Returns the value of attribute country_code2

Returns:

  • (Object)

    the current value of country_code2



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

def country_code2
  @country_code2
end

#country_code3Object

Returns the value of attribute country_code3

Returns:

  • (Object)

    the current value of 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

Returns:

  • (Object)

    the current value of country_name



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

def country_name
  @country_name
end

#dma_codeObject

Returns the value of attribute dma_code

Returns:

  • (Object)

    the current value of dma_code



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

def dma_code
  @dma_code
end

#ipObject

Returns the value of attribute ip

Returns:

  • (Object)

    the current value of ip



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

def ip
  @ip
end

#latitudeObject

Returns the value of attribute latitude

Returns:

  • (Object)

    the current value of latitude



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

def latitude
  @latitude
end

#longitudeObject

Returns the value of attribute longitude

Returns:

  • (Object)

    the current value of longitude



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

def longitude
  @longitude
end

#postal_codeObject

Returns the value of attribute postal_code

Returns:

  • (Object)

    the current value of postal_code



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

def postal_code
  @postal_code
end

#region_nameObject

Returns the value of attribute region_name

Returns:

  • (Object)

    the current value of region_name



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

def region_name
  @region_name
end

#requestObject

Returns the value of attribute request

Returns:

  • (Object)

    the current value of request



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

def request
  @request
end

#timezoneObject

Returns the value of attribute timezone

Returns:

  • (Object)

    the current value of timezone



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

def timezone
  @timezone
end

Instance Method Details

#to_hashObject



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

def to_hash
  Hash[each_pair.to_a]
end