Class: Exerb::Win32::Struct::ImageResourceDirectoryEntry
- Inherits:
-
Base
- Object
- Base
- Exerb::Win32::Struct::ImageResourceDirectoryEntry
show all
- Defined in:
- lib/exerb/win32/struct/image_resource_directory_entry.rb
Overview
Constant Summary
collapse
- FORMAT =
'LL'
Instance Attribute Summary collapse
Attributes inherited from Base
#position
Instance Method Summary
collapse
Methods inherited from Base
read, #read, #size, #update
Constructor Details
Returns a new instance of ImageResourceDirectoryEntry.
24
25
26
27
28
|
# File 'lib/exerb/win32/struct/image_resource_directory_entry.rb', line 24
def initialize
super()
@name = 0
@offset_to_data = 0
end
|
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
30
31
32
|
# File 'lib/exerb/win32/struct/image_resource_directory_entry.rb', line 30
def name
@name
end
|
#offset_to_data ⇒ Object
Returns the value of attribute offset_to_data.
30
31
32
|
# File 'lib/exerb/win32/struct/image_resource_directory_entry.rb', line 30
def offset_to_data
@offset_to_data
end
|
Instance Method Details
#data_is_directory? ⇒ Boolean
#id ⇒ Object
41
42
43
|
# File 'lib/exerb/win32/struct/image_resource_directory_entry.rb', line 41
def id
return @name & 0xFFFF
end
|
#name_is_string? ⇒ Boolean
#offset_to_directory ⇒ Object
#offset_to_directory=(value) ⇒ Object
#offset_to_string ⇒ Object
#offset_to_string=(value) ⇒ Object
#pack ⇒ Object
32
33
34
|
# File 'lib/exerb/win32/struct/image_resource_directory_entry.rb', line 32
def pack
return [@name, @offset_to_data].pack(FORMAT)
end
|
#unpack(bin) ⇒ Object
36
37
38
39
|
# File 'lib/exerb/win32/struct/image_resource_directory_entry.rb', line 36
def unpack(bin)
@name, @offset_to_data = bin.unpack(FORMAT)
return self
end
|