Class: Datacite::Mapping::GeoLocationPointNode
- Inherits:
-
XML::MappingExtensions::NodeBase
- Object
- XML::MappingExtensions::NodeBase
- Datacite::Mapping::GeoLocationPointNode
- Defined in:
- lib/datacite/mapping/geo_location_point.rb
Overview
XML mapping node for <geoLocationPoint/>
Instance Method Summary collapse
-
#to_value(xml_text)
Converts a whitespace-separated pair of coordinates to a GeoLocationPoint.
Instance Method Details
#to_value(xml_text)
Converts a whitespace-separated pair of coordinates to a Datacite::Mapping::GeoLocationPoint.
93 94 95 96 97 |
# File 'lib/datacite/mapping/geo_location_point.rb', line 93 def to_value(xml_text) stripped = xml_text.strip coords = stripped.split(/\s+/).map(&:to_f) GeoLocationPoint.new(*coords) end |