Class: Circle
Overview
Represents a circle, given its center and radius
Instance Attribute Summary collapse
-
#center ⇒ Object
readonly
Returns the value of attribute center.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#radius ⇒ Object
readonly
Returns the value of attribute radius.
Attributes inherited from Ellipse
Instance Method Summary collapse
-
#initialize(name, center, radius) ⇒ Circle
constructor
A new instance of Circle.
Methods inherited from Ellipse
Methods included from SITACObjects
Constructor Details
#initialize(name, center, radius) ⇒ Circle
Returns a new instance of Circle.
150 151 152 |
# File 'lib/sitac_objects.rb', line 150 def initialize(name, center, radius) super(name, center, radius, radius) end |
Instance Attribute Details
#center ⇒ Object (readonly)
Returns the value of attribute center.
145 146 147 |
# File 'lib/sitac_objects.rb', line 145 def center @center end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
145 146 147 |
# File 'lib/sitac_objects.rb', line 145 def name @name end |
#radius ⇒ Object (readonly)
Returns the value of attribute radius.
145 146 147 |
# File 'lib/sitac_objects.rb', line 145 def radius @radius end |