Class: VectorSalad::StandardShapes::Triangle
- Inherits:
-
Polygon
- Object
- BasicShape
- Polygon
- VectorSalad::StandardShapes::Triangle
- Defined in:
- lib/vector_salad/standard_shapes/triangle.rb
Overview
Equilateral triangle shape.
Instance Attribute Summary (collapse)
-
- (Object) options
inherited
from BasicShape
Returns the value of attribute options.
-
- (Object) sides
inherited
from Polygon
readonly
Returns the value of attribute sides.
Instance Method Summary (collapse)
-
- (Triangle) initialize(radius, **options)
constructor
Create a new equilateral triangle.
Constructor Details
- (Triangle) initialize(radius, **options)
Create a new equilateral triangle.
11 12 13 |
# File 'lib/vector_salad/standard_shapes/triangle.rb', line 11 def initialize(radius, **) super(3, radius, **) end |
Instance Attribute Details
- (Object) options Originally defined in class BasicShape
Returns the value of attribute options
- (Object) sides (readonly) Originally defined in class Polygon
Returns the value of attribute sides