Class: VectorSalad::StandardShapes::Square
- Inherits:
-
Rect
- Object
- BasicShape
- Rect
- VectorSalad::StandardShapes::Square
- Defined in:
- lib/vector_salad/standard_shapes/square.rb
Overview
Square shape with equal width and height.
Instance Attribute Summary (collapse)
-
- (Object) height
inherited
from Rect
readonly
Returns the value of attribute height.
-
- (Object) options
inherited
from BasicShape
Returns the value of attribute options.
-
- (Object) width
inherited
from Rect
readonly
Returns the value of attribute width.
Instance Method Summary (collapse)
-
- (Square) initialize(size, **options)
constructor
Create a square with equal width and height.
Constructor Details
- (Square) initialize(size, **options)
Create a square with equal width and height.
12 13 14 15 |
# File 'lib/vector_salad/standard_shapes/square.rb', line 12 def initialize(size, **) super(size, size, **) self end |
Instance Attribute Details
- (Object) height (readonly) Originally defined in class Rect
Returns the value of attribute height
- (Object) options Originally defined in class BasicShape
Returns the value of attribute options
- (Object) width (readonly) Originally defined in class Rect
Returns the value of attribute width