Class: CloudMade::Location

Inherits:
Object
  • Object
show all
Defined in:
lib/cloudmade/geocoding.rb

Overview

Location of the object in geographical terms

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ Location

Returns a new instance of Location.



82
83
84
85
86
87
88
# File 'lib/cloudmade/geocoding.rb', line 82

def initialize(data)
  self.road = data['road']
  self.city = data['city']
  self.county = data['county']
  self.country = data['country']
  self.postcode = data['postcode']
end

Instance Attribute Details

#cityObject

city: City, where the object is situated



74
75
76
# File 'lib/cloudmade/geocoding.rb', line 74

def city
  @city
end

#countryObject

country: Country in which the object is situated



78
79
80
# File 'lib/cloudmade/geocoding.rb', line 78

def country
  @country
end

#countyObject

county: County, where the object is situated



76
77
78
# File 'lib/cloudmade/geocoding.rb', line 76

def county
  @county
end

#postcodeObject

postcode: Postcode, which corresponds to location of the object



80
81
82
# File 'lib/cloudmade/geocoding.rb', line 80

def postcode
  @postcode
end

#roadObject

road: Road on which object is situated



72
73
74
# File 'lib/cloudmade/geocoding.rb', line 72

def road
  @road
end