Class: Mikunyan::Asset::ObjectEntry
- Inherits:
-
Struct
- Object
- Struct
- Mikunyan::Asset::ObjectEntry
- Defined in:
- lib/mikunyan/asset.rb
Overview
Struct for representing Asset object information
Instance Attribute Summary collapse
-
#class_id ⇒ Integer?
class ID.
-
#class_idx ⇒ Integer?
class definition index.
-
#data ⇒ String
binary data of object.
-
#destroyed? ⇒ Boolean
destroyed or not.
-
#klass ⇒ Klass
The current value of klass.
-
#offset ⇒ Integer
data offset.
-
#parent_asset ⇒ Mikunyan::Asset
The current value of parent_asset.
-
#path_id ⇒ Integer
path ID.
-
#size ⇒ Integer
data size.
-
#stripped? ⇒ Object
Returns the value of attribute stripped?.
-
#type_id ⇒ Integer?
type ID.
Instance Method Summary collapse
-
#parse ⇒ Object
Alias to #parse_object.
-
#parse_simple ⇒ Object
Alias to #parse_object_simple.
-
#type ⇒ String?
Returns object type name string.
Instance Attribute Details
#class_id ⇒ Integer?
class ID
41 42 43 |
# File 'lib/mikunyan/asset.rb', line 41 def class_id @class_id end |
#class_idx ⇒ Integer?
class definition index
41 42 43 |
# File 'lib/mikunyan/asset.rb', line 41 def class_idx @class_idx end |
#data ⇒ String
binary data of object
41 42 43 |
# File 'lib/mikunyan/asset.rb', line 41 def data @data end |
#destroyed? ⇒ Boolean
destroyed or not
41 42 43 |
# File 'lib/mikunyan/asset.rb', line 41
def destroyed?
@destroyed?
end
|
#klass ⇒ Klass
Returns the current value of klass.
41 42 43 |
# File 'lib/mikunyan/asset.rb', line 41 def klass @klass end |
#offset ⇒ Integer
data offset
41 42 43 |
# File 'lib/mikunyan/asset.rb', line 41 def offset @offset end |
#parent_asset ⇒ Mikunyan::Asset
Returns the current value of parent_asset.
41 42 43 |
# File 'lib/mikunyan/asset.rb', line 41 def parent_asset @parent_asset end |
#path_id ⇒ Integer
path ID
41 42 43 |
# File 'lib/mikunyan/asset.rb', line 41 def path_id @path_id end |
#size ⇒ Integer
data size
41 42 43 |
# File 'lib/mikunyan/asset.rb', line 41 def size @size end |
#stripped? ⇒ Object
Returns the value of attribute stripped?
41 42 43 |
# File 'lib/mikunyan/asset.rb', line 41
def stripped?
@stripped?
end
|
#type_id ⇒ Integer?
type ID
41 42 43 |
# File 'lib/mikunyan/asset.rb', line 41 def type_id @type_id end |
Instance Method Details
#parse ⇒ Object
Alias to Mikunyan::Asset#parse_object
47 48 49 |
# File 'lib/mikunyan/asset.rb', line 47 def parse parent_asset.parse_object(self) end |
#parse_simple ⇒ Object
Alias to Mikunyan::Asset#parse_object_simple
52 53 54 |
# File 'lib/mikunyan/asset.rb', line 52 def parse_simple parent_asset.parse_object_simple(self) end |
#type ⇒ String?
Returns object type name string
58 59 60 |
# File 'lib/mikunyan/asset.rb', line 58 def type klass&.type_tree&.tree&.type || Mikunyan::Constants::CLASS_ID2NAME[class_id || klass&.class_id] end |