Class: Placemaker::PlaceDetails

Inherits:
Object
  • Object
show all
Includes:
XmlHelper
Defined in:
lib/placemaker/place_details.rb

Overview

container for one named place mentioned in the document

Instance Method Summary collapse

Methods included from XmlHelper

#initialize

Instance Method Details

#confidenceObject

confidence that the document mentions the place (range 1-10)



23
24
25
# File 'lib/placemaker/place_details.rb', line 23

def confidence
  nested_node('confidence').to_i
end

#match_typeObject

type of match (0=text or text and coordinates, 1=coordinates only)



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

def match_type
  nested_node('matchType').to_i
end

#placeObject

Returns a Placemaker::Location object as a container for place information.



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

def place
  Placemaker::Location.new(@nodeset.search('.//xmlns:place'))
end

#weightObject

relative weight of the place within the document (range 1-100)



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

def weight
  nested_node('weight').to_i
end