Exception: BezierCurve::InsufficientPointsError
- Inherits:
-
ArgumentError
- Object
- ArgumentError
- BezierCurve::InsufficientPointsError
- Defined in:
- lib/bezier_curve.rb
Overview
Indicates that there aren’t enough control points; minimum of two for a first-degree bezier.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ InsufficientPointsError
constructor
A new instance of InsufficientPointsError.
Constructor Details
#initialize ⇒ InsufficientPointsError
Returns a new instance of InsufficientPointsError.
143 144 145 |
# File 'lib/bezier_curve.rb', line 143 def initialize super "All points must have the same number of dimensions" end |
Class Method Details
.check!(pointset) ⇒ Object
146 147 148 149 |
# File 'lib/bezier_curve.rb', line 146 def self.check! pointset raise new.tap{|e|e.backtrace.shift} if pointset.size <= 1 end |