Class: Sphere
Instance Attribute Summary collapse
-
#dia ⇒ Object
Returns the value of attribute dia.
Instance Method Summary collapse
-
#initialize(dia) ⇒ Sphere
constructor
A new instance of Sphere.
- #radius ⇒ Object
Methods inherited from Shape
#*, #+, #-, #bbox, #extrude, #max_x, #max_y, #max_z, #min_x, #min_y, #min_z, #move_x, #move_y, #move_z, #render, #revolve, #rot_x, #rot_y, #rot_z, #scale_x, #scale_y, #scale_z, #x_size, #y_size, #z_size, #~@
Constructor Details
#initialize(dia) ⇒ Sphere
Returns a new instance of Sphere.
295 296 297 |
# File 'lib/rcad.rb', line 295 def initialize(dia) @dia = dia end |
Instance Attribute Details
#dia ⇒ Object
Returns the value of attribute dia.
293 294 295 |
# File 'lib/rcad.rb', line 293 def dia @dia end |
Instance Method Details
#radius ⇒ Object
299 300 301 |
# File 'lib/rcad.rb', line 299 def radius dia / 2.0 end |