Method: Geometry::Point.one
- Defined in:
- lib/geometry/point.rb
.one(size = nil) ⇒ PointOne
Creates and returns a new Geometry::PointOne instance. Or, a Geometry::Point full of ones if the size argument is given.
51 52 53 |
# File 'lib/geometry/point.rb', line 51 def self.one(size=nil) size ? Point[Array.new(size, 1)] : PointOne.new end |