Class: Square

Inherits:
Rectangle show all
Defined in:
lib/rcad.rb

Instance Attribute Summary collapse

Attributes inherited from Rectangle

#xsize, #ysize

Attributes inherited from Polygon

#paths, #points

Instance Method Summary collapse

Methods inherited from Shape

#*, #+, #-, #align, #back, #bbox, #bottom, #center, #cx, #cy, #cz, #extrude, #front, #left, #maxx, #maxy, #maxz, #minx, #miny, #minz, #mirror, #mirror_x, #mirror_y, #mirror_z, #move, #move_x, #move_y, #move_z, #render, #revolve, #right, #rot_x, #rot_y, #rot_z, #rotate, #scale, #scale_x, #scale_y, #scale_z, #top, #transform, #xcenter, #xsize, #ycenter, #ysize, #zcenter, #zsize, #~@

Constructor Details

#initialize(size) ⇒ Square

Returns a new instance of Square.



443
444
445
446
447
# File 'lib/rcad.rb', line 443

def initialize(size)
  @size = size

  super(size, size)
end

Instance Attribute Details

#sizeObject (readonly)

Returns the value of attribute size.



441
442
443
# File 'lib/rcad.rb', line 441

def size
  @size
end