Class: RuPov::Objects::FiniteSolidPrimitives::Cylinder
- Defined in:
- lib/rupov.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(leftCentre, rightCentre, radius, open = false) {|_self| ... } ⇒ Cylinder
constructor
A new instance of Cylinder.
- #to_s ⇒ Object
Methods inherited from Base
Constructor Details
#initialize(leftCentre, rightCentre, radius, open = false) {|_self| ... } ⇒ Cylinder
Returns a new instance of Cylinder.
67 68 69 70 71 72 |
# File 'lib/rupov.rb', line 67 def initialize( leftCentre, rightCentre, radius, open = false ) super( 'cylinder' ) self << Methods::MultiValue.new([leftCentre,rightCentre,radius]) @open = open yield(self) if block_given? and self.class == Cylinder end |
Instance Method Details
#to_s ⇒ Object
73 74 75 76 77 78 |
# File 'lib/rupov.rb', line 73 def to_s self << "open" if @open result = super() self.pop() if @open result end |