lib/geometry/polygon.rb in geometry-in-ruby-0.0.1 vs lib/geometry/polygon.rb in geometry-in-ruby-0.0.2
- old
+ new
@@ -14,10 +14,14 @@
== Usage
=end
class Polygon < Polyline
-
+ attr_writer :options
+ def options
+ @options = {} if !@options
+ @options
+ end
# Construct a new Polygon from Points and/or Edges
# The constructor will try to convert all of its arguments into Points and
# Edges. Then successive Points will be collpased into Edges. Successive
# Edges that share a common vertex will be added to the new Polygon. If
# there's a gap between Edges it will be automatically filled with a new