Class: Mikunyan::Asset::ObjectEntry

Inherits:
Struct
  • Object
show all
Defined in:
lib/mikunyan/asset.rb

Overview

Struct for representing Asset object information

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#class_idInteger?

class ID

Returns:

  • (Integer, nil)

    the current value of class_id



41
42
43
# File 'lib/mikunyan/asset.rb', line 41

def class_id
  @class_id
end

#class_idxInteger?

class definition index

Returns:

  • (Integer, nil)

    the current value of class_idx



41
42
43
# File 'lib/mikunyan/asset.rb', line 41

def class_idx
  @class_idx
end

#dataString

binary data of object

Returns:

  • (String)

    the current value of data



41
42
43
# File 'lib/mikunyan/asset.rb', line 41

def data
  @data
end

#destroyed?Boolean

destroyed or not

Returns:

  • (Boolean)

    the current value of destroyed?



41
42
43
# File 'lib/mikunyan/asset.rb', line 41

def destroyed?
  @destroyed?
end

#klassKlass

Returns the current value of klass.

Returns:

  • (Klass)

    the current value of klass



41
42
43
# File 'lib/mikunyan/asset.rb', line 41

def klass
  @klass
end

#offsetInteger

data offset

Returns:

  • (Integer)

    the current value of offset



41
42
43
# File 'lib/mikunyan/asset.rb', line 41

def offset
  @offset
end

#parent_assetMikunyan::Asset

Returns the current value of parent_asset.

Returns:



41
42
43
# File 'lib/mikunyan/asset.rb', line 41

def parent_asset
  @parent_asset
end

#path_idInteger

path ID

Returns:

  • (Integer)

    the current value of path_id



41
42
43
# File 'lib/mikunyan/asset.rb', line 41

def path_id
  @path_id
end

#sizeInteger

data size

Returns:

  • (Integer)

    the current value of size



41
42
43
# File 'lib/mikunyan/asset.rb', line 41

def size
  @size
end

#stripped?Object

Returns the value of attribute stripped?

Returns:

  • (Object)

    the current value of stripped?



41
42
43
# File 'lib/mikunyan/asset.rb', line 41

def stripped?
  @stripped?
end

#type_idInteger?

type ID

Returns:

  • (Integer, nil)

    the current value of type_id



41
42
43
# File 'lib/mikunyan/asset.rb', line 41

def type_id
  @type_id
end

Instance Method Details

#parseObject



47
48
49
# File 'lib/mikunyan/asset.rb', line 47

def parse
  parent_asset.parse_object(self)
end

#parse_simpleObject



52
53
54
# File 'lib/mikunyan/asset.rb', line 52

def parse_simple
  parent_asset.parse_object_simple(self)
end

#typeString?

Returns object type name string

Returns:

  • (String, nil)

    type name



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