lib/rcap/base/polygon.rb in rcap-2.2.1 vs lib/rcap/base/polygon.rb in rcap-2.3.0

- old
+ new

@@ -90,12 +90,17 @@ end end end end + # @return [Hash] + def to_yaml_data + @points.map{ |point| [ point.lattitude, point.longitude ]} + end + # @return [String] def to_yaml( options = {} ) - @points.map{ |point| [ point.lattitude, point.longitude ]}.to_yaml( options ) + self.to_yaml_data.to_yaml( options ) end POINTS_KEY = 'points' # @return [Polygon]