lib/rcap/cap_1_0/polygon.rb in rcap-1.2.0 vs lib/rcap/cap_1_0/polygon.rb in rcap-1.2.1
- old
+ new
@@ -63,13 +63,10 @@
end
end
def to_yaml( options = {} ) # :nodoc:
- yaml_points = self.points.map{ |point| [ point.lattitude, point.longitude ]}
- def yaml_points.to_yaml_style; :inline; end
-
- yaml_points.to_yaml( options )
+ self.points.map{ |point| [ point.lattitude, point.longitude ]}.to_yaml( options )
end
def self.from_yaml_data( polygon_yaml_data ) # :nodoc:
self.new( :points => Array( polygon_yaml_data ).map{ |lattitude, longitude| Point.new( :lattitude => lattitude, :longitude => longitude )})
end