Class: RuPov::Base
- Inherits:
-
Object
- Object
- RuPov::Base
- Defined in:
- lib/rupov.rb
Direct Known Subclasses
Atmosphere::Background, CSG::Difference, CSG::Intersection, CSG::Merge, CSG::Union, Camera::Camera, Group, LightSources::LightGroup, LightSources::LightSource, Objects::FinitePatchPrimitives::Disc, Objects::FinitePatchPrimitives::Polygon, Objects::FinitePatchPrimitives::SmoothTriangle, Objects::FinitePatchPrimitives::Triangle, Objects::FiniteSolidPrimitives::Blob, Objects::FiniteSolidPrimitives::Box, Objects::FiniteSolidPrimitives::Cone, Objects::FiniteSolidPrimitives::Cylinder, Objects::FiniteSolidPrimitives::Lathe, Objects::FiniteSolidPrimitives::Prism, Objects::FiniteSolidPrimitives::Sphere, Objects::FiniteSolidPrimitives::SphereSweep, Objects::FiniteSolidPrimitives::SuperEllipsoid, Objects::FiniteSolidPrimitives::SurfaceOfRevolution, Objects::FiniteSolidPrimitives::Text, Objects::FiniteSolidPrimitives::Torus, Objects::InfiniteSolidPrimitives::Plane, Textures::Finish, Textures::Normal, Textures::Pigments::Pigment, Textures::Texture
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #<<(child) ⇒ Object
-
#initialize(name = '') {|_self| ... } ⇒ Base
constructor
A new instance of Base.
- #to_s ⇒ Object
Constructor Details
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
6 7 8 |
# File 'lib/rupov.rb', line 6 def name @name end |
Instance Method Details
#<<(child) ⇒ Object
18 19 20 |
# File 'lib/rupov.rb', line 18 def <<( child ) @children << child end |
#to_s ⇒ Object
12 13 14 15 16 17 |
# File 'lib/rupov.rb', line 12 def to_s result = "#{name}#{name.length>0?' ':''}{\n" @children.each { |child| result << child.to_s.rstrip+"\n" } result << "}" result end |