lib/geometry/size.rb in geometry-6.5 vs lib/geometry/size.rb in geometry-6.6
- old
+ new
@@ -15,12 +15,10 @@
=== Constructor
size = Geometry::Size[x,y,z]
=end
class Size < Vector
- attr_reader :x, :y, :z
-
# Allow vector-style initialization, but override to support copy-init
# from Vector, Point or another Size
#
# @overload [](x,y,z,...)
# @overload [](Point)
@@ -28,10 +26,10 @@
# @overload [](Vector)
# @return [Size] A new {Size} object
def self.[](*array)
array.map! {|a| a.respond_to?(:to_a) ? a.to_a : a }
array.flatten!
- super *array
+ super(*array)
end
# Creates and returns a new {SizeOne} instance. Or, a {Size} full of ones if the size argument is given.
# @param size [Number] the size of the new {Size} full of ones
# @return [SizeOne] A new {SizeOne} instance