Sha256: 3718b9e677b8686c200d1af5df9cb91bf055fe4c2e093c722c112cc49e5a8826
Contents?: true
Size: 567 Bytes
Versions: 6
Compression:
Stored size: 567 Bytes
Contents
module OData4 module Properties module Geography class Point < Base def type 'Edm.GeographyPoint' end def coords_to_s value.join(' ') end def coords_from_s(str) str.split(' ').map(&:to_f) end def xml_value { pos: coords_to_s } end private def self.parse_xml(property_xml) property_xml.xpath('//pos').map do |el| el.content.split(' ').map(&:to_f) end.flatten end end end end end
Version data entries
6 entries across 6 versions & 1 rubygems