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.
159 160 161 |
# File 'lib/bezier_curve.rb', line 159 def initialize super "You must supply a minimum of two points" end |
Class Method Details
.check!(pointset) ⇒ Object
162 163 164 165 |
# File 'lib/bezier_curve.rb', line 162 def self.check! pointset raise self if pointset.size <= 1 end |