class OData4::Properties::Geography::Point

Private Class Methods

parse_xml(property_xml) click to toggle source
# File lib/odata4/properties/geography/point.rb, line 23
def self.parse_xml(property_xml)
  property_xml.xpath('//pos').map do |el|
    el.content.split(' ').map(&:to_f)
  end.flatten
end

Public Instance Methods

coords_from_s(str) click to toggle source
# File lib/odata4/properties/geography/point.rb, line 13
def coords_from_s(str)
  str.split(' ').map(&:to_f)
end
coords_to_s() click to toggle source
# File lib/odata4/properties/geography/point.rb, line 9
def coords_to_s
  value.join(' ')
end
type() click to toggle source
# File lib/odata4/properties/geography/point.rb, line 5
def type
  'Edm.GeographyPoint'
end
xml_value() click to toggle source
# File lib/odata4/properties/geography/point.rb, line 17
def xml_value
  { pos: coords_to_s }
end