Class: Placemaker::Location
- Inherits:
-
Object
- Object
- Placemaker::Location
- Includes:
- XmlHelper
- Defined in:
- lib/placemaker/location.rb
Overview
Parses and contains data for place
, administrative scope and geographic scope elements.
Instance Method Summary collapse
-
#centroid ⇒ Object
centroid for the place.
-
#location_type ⇒ Object
place type name for the place.
-
#name ⇒ Object
fully qualified name for the place.
-
#woe_id ⇒ Object
permanent identifier for the place.
Methods included from XmlHelper
Instance Method Details
#centroid ⇒ Object
centroid for the place
23 24 25 |
# File 'lib/placemaker/location.rb', line 23 def centroid Placemaker::Coordinates.new(@nodeset.search('.//xmlns:centroid', 'xmlns' => 'http://wherein.yahooapis.com/v1/schema')) end |
#location_type ⇒ Object
place type name for the place
18 19 20 |
# File 'lib/placemaker/location.rb', line 18 def location_type nested_node('type') end |
#name ⇒ Object
fully qualified name for the place
13 14 15 |
# File 'lib/placemaker/location.rb', line 13 def name nested_node('name') end |
#woe_id ⇒ Object
permanent identifier for the place
8 9 10 |
# File 'lib/placemaker/location.rb', line 8 def woe_id nested_node('woeId').to_i end |