Class: Blender3d::PointerType
- Inherits:
-
Object
- Object
- Blender3d::PointerType
- Defined in:
- lib/blender-3d/types/pointer_type.rb
Instance Attribute Summary collapse
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(type) ⇒ PointerType
constructor
A new instance of PointerType.
- #inspect ⇒ Object
- #read(reader) ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(type) ⇒ PointerType
Returns a new instance of PointerType.
5 6 7 |
# File 'lib/blender-3d/types/pointer_type.rb', line 5 def initialize(type) @type = type end |
Instance Attribute Details
#type ⇒ Object (readonly)
Returns the value of attribute type.
3 4 5 |
# File 'lib/blender-3d/types/pointer_type.rb', line 3 def type @type end |
Instance Method Details
#inspect ⇒ Object
13 14 15 |
# File 'lib/blender-3d/types/pointer_type.rb', line 13 def inspect "#{@type.inspect}*" end |
#read(reader) ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/blender-3d/types/pointer_type.rb', line 17 def read(reader) pointer = Pointer.new(reader.read_pointer) model = reader.model block = model.pointers[pointer] if block && block.data.is_a?(String) && !block.type block.type = get_type(block, model) block.parse_data(reader.model) end pointer end |
#to_s ⇒ Object
9 10 11 |
# File 'lib/blender-3d/types/pointer_type.rb', line 9 def to_s "Pointer(#@type)" end |