Class: Placemaker::Location

Inherits:
Object
  • Object
show all
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

Methods included from XmlHelper

#initialize

Instance Method Details

#centroidObject

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_typeObject

place type name for the place



18
19
20
# File 'lib/placemaker/location.rb', line 18

def location_type
  nested_node('type')
end

#nameObject

fully qualified name for the place



13
14
15
# File 'lib/placemaker/location.rb', line 13

def name
  nested_node('name')
end

#woe_idObject

permanent identifier for the place



8
9
10
# File 'lib/placemaker/location.rb', line 8

def woe_id
  nested_node('woeId').to_i
end