lib/aixm/component/geometry/point.rb in aixm-1.2.1 vs lib/aixm/component/geometry/point.rb in aixm-1.3.0

- old
+ new

@@ -12,11 +12,12 @@ # xy: AIXM.xy # ) # # @see https://gitlab.com/openflightmaps/ofmx/wikis/Airspace#point class Point - include AIXM::Association + include AIXM::Concerns::Association + include AIXM::Concerns::XMLBuilder # @!method geometry # @return [AIXM::Component::Geometry] geometry this segment belongs to belongs_to :geometry, as: :segment @@ -42,12 +43,11 @@ def xy=(value) fail(ArgumentError, "invalid xy") unless value.is_a? AIXM::XY @xy = value end - # @return [String] AIXM or OFMX markup - def to_xml - builder = Builder::XmlMarkup.new(indent: 2) + # @!visibility private + def add_to(builder) builder.Avx do |avx| avx.codeType('GRC') avx.geoLat(xy.lat(AIXM.schema)) avx.geoLong(xy.long(AIXM.schema)) avx.codeDatum('WGE')