class LibTAD::Places::Geo

Geographical information about a location.

Attributes

country[R]

@return [Country] Country of the location.

latitude[R]

@return [Float] Geographical latitude of the location.

longitude[R]

@return [Float] Geographical longitude of the location.

name[R]

@return [String] The name of the location.

state[R]

@return [String] The state of the location within the country (only if applicable).

Public Class Methods

new(hash) click to toggle source
# File lib/types/places/geo.rb, line 25
def initialize(hash)
  @name = hash.fetch('name', nil)
  @state = hash.fetch('state', nil)
  @country = Country.new hash['country'] unless !hash.key?('country')
  @latitude = hash.fetch('latitude', nil)
  @longitude = hash.fetch('longitude', nil)
end