Class: CloudMade::Location
- Inherits:
-
Object
- Object
- CloudMade::Location
- Defined in:
- lib/cloudmade/geocoding.rb
Overview
Location of the object in geographical terms
Instance Attribute Summary collapse
-
#city ⇒ Object
city: City, where the object is situated.
-
#country ⇒ Object
country: Country in which the object is situated.
-
#county ⇒ Object
county: County, where the object is situated.
-
#postcode ⇒ Object
postcode: Postcode, which corresponds to location of the object.
-
#road ⇒ Object
road: Road on which object is situated.
Instance Method Summary collapse
-
#initialize(data) ⇒ Location
constructor
A new instance of Location.
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
#city ⇒ Object
city: City, where the object is situated
74 75 76 |
# File 'lib/cloudmade/geocoding.rb', line 74 def city @city end |
#country ⇒ Object
country: Country in which the object is situated
78 79 80 |
# File 'lib/cloudmade/geocoding.rb', line 78 def country @country end |
#county ⇒ Object
county: County, where the object is situated
76 77 78 |
# File 'lib/cloudmade/geocoding.rb', line 76 def county @county end |
#postcode ⇒ Object
postcode: Postcode, which corresponds to location of the object
80 81 82 |
# File 'lib/cloudmade/geocoding.rb', line 80 def postcode @postcode end |
#road ⇒ Object
road: Road on which object is situated
72 73 74 |
# File 'lib/cloudmade/geocoding.rb', line 72 def road @road end |