Class: Placemaker::PlaceDetails
- Inherits:
-
Object
- Object
- Placemaker::PlaceDetails
- Includes:
- XmlHelper
- Defined in:
- lib/placemaker/place_details.rb
Overview
container for one named place mentioned in the document
Instance Method Summary collapse
-
#confidence ⇒ Object
confidence that the document mentions the place (range 1-10).
-
#match_type ⇒ Object
type of match (0=text or text and coordinates, 1=coordinates only).
-
#place ⇒ Object
Returns a Placemaker::Location object as a container for place information.
-
#weight ⇒ Object
relative weight of the place within the document (range 1-100).
Methods included from XmlHelper
Instance Method Details
#confidence ⇒ Object
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_type ⇒ Object
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 |
#place ⇒ Object
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 |
#weight ⇒ Object
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 |