Class: Blender3d::StructureDefinition
- Inherits:
-
Object
- Object
- Blender3d::StructureDefinition
- Defined in:
- lib/blender-3d/structure_definition.rb
Instance Attribute Summary collapse
-
#fields ⇒ Object
readonly
Returns the value of attribute fields.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#size ⇒ Object
readonly
Returns the value of attribute size.
Instance Method Summary collapse
-
#initialize(name, size, fields = []) ⇒ StructureDefinition
constructor
A new instance of StructureDefinition.
- #read(reader) ⇒ Object
- #structure_class ⇒ Object
Constructor Details
#initialize(name, size, fields = []) ⇒ StructureDefinition
Returns a new instance of StructureDefinition.
5 6 7 8 |
# File 'lib/blender-3d/structure_definition.rb', line 5 def initialize(name, size, fields = []) name = name[0].upcase + name[1..-1] @name, @size, @fields = name, size, fields end |
Instance Attribute Details
#fields ⇒ Object (readonly)
Returns the value of attribute fields.
3 4 5 |
# File 'lib/blender-3d/structure_definition.rb', line 3 def fields @fields end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/blender-3d/structure_definition.rb', line 3 def name @name end |
#size ⇒ Object (readonly)
Returns the value of attribute size.
3 4 5 |
# File 'lib/blender-3d/structure_definition.rb', line 3 def size @size end |
Instance Method Details
#read(reader) ⇒ Object
10 11 12 |
# File 'lib/blender-3d/structure_definition.rb', line 10 def read(reader) structure_class.new(reader) end |