Class: Square
Instance Attribute Summary collapse
-
#size ⇒ Object
readonly
Returns the value of attribute size.
Attributes inherited from Polygon
Instance Method Summary collapse
-
#initialize(size) ⇒ Square
constructor
A new instance of Square.
Constructor Details
#initialize(size) ⇒ Square
Returns a new instance of Square.
239 240 241 242 243 |
# File 'lib/rcad.rb', line 239 def initialize(size) @size = size super([[0,0], [size,0], [size,size], [0,size]]) end |
Instance Attribute Details
#size ⇒ Object (readonly)
Returns the value of attribute size.
237 238 239 |
# File 'lib/rcad.rb', line 237 def size @size end |