lib/geometry/rectangle.rb in geometry-in-ruby-0.0.1 vs lib/geometry/rectangle.rb in geometry-in-ruby-0.0.2
- old
+ new
@@ -33,10 +33,14 @@
attr_reader :origin
# @return [Size] The {Size} of the {Rectangle}
attr_reader :size
# @return [Number] Width of the {Rectangle}
attr_reader :width
-
+ attr_writer :options
+ def options
+ @options = {} if !@options
+ end
+
# @overload new(width, height)
# Creates a {Rectangle} of the given width and height, centered on the origin
# @param [Number] height Height
# @param [Number] width Width
# @return [CenteredRectangle]