Class: Mikunyan::CustomTypes::TextAsset

Inherits:
BaseObject show all
Defined in:
lib/mikunyan/types/text_asset.rb

Instance Attribute Summary

Attributes inherited from BaseObject

#object_entry

Attributes inherited from ObjectValue

#attr, #endian, #is_struct, #name, #type, #value

Instance Method Summary collapse

Methods inherited from BaseObject

#object_name, #path_id

Methods inherited from ObjectValue

#[], #[]=, #array?, #initialize, #key?, #keys, #method_missing, #respond_to_missing?, #simplify, #struct?, #value?

Constructor Details

This class inherits a constructor from Mikunyan::ObjectValue

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Mikunyan::ObjectValue

Instance Method Details

#bytesObject



14
15
16
# File 'lib/mikunyan/types/text_asset.rb', line 14

def bytes
  @attr['m_Script']&.value.dup.force_encoding('ASCII-8BIT')
end

#textObject



10
11
12
# File 'lib/mikunyan/types/text_asset.rb', line 10

def text
  @attr['m_Script']&.value
end