Class: MachO::LoadCommands::NoteCommand
- Inherits:
-
LoadCommand
- Object
- MachOStructure
- LoadCommand
- MachO::LoadCommands::NoteCommand
- Defined in:
- lib/macho/load_commands.rb
Overview
A load command containing an owner name and offset/size for an arbitrary data region. Corresponds to LC_NOTE.
Constant Summary collapse
- FORMAT =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
"L=2Z16Q=2"
- SIZEOF =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
48
Instance Attribute Summary collapse
-
#data_owner ⇒ String
readonly
The name of the owner for this note.
-
#offset ⇒ Integer
readonly
The offset, within the file, of the note.
-
#size ⇒ Integer
readonly
The size, in bytes, of the note.
Attributes inherited from LoadCommand
Instance Method Summary collapse
-
#initialize(view, cmd, cmdsize, data_owner, offset, size) ⇒ NoteCommand
constructor
A new instance of NoteCommand.
-
#to_h ⇒ Hash
A hash representation of this NoteCommand.
Methods inherited from LoadCommand
create, new_from_bin, #serializable?, #serialize, #to_s, #type
Methods inherited from MachOStructure
Constructor Details
#initialize(view, cmd, cmdsize, data_owner, offset, size) ⇒ NoteCommand
Returns a new instance of NoteCommand.
1781 1782 1783 1784 1785 1786 |
# File 'lib/macho/load_commands.rb', line 1781 def initialize(view, cmd, cmdsize, data_owner, offset, size) super(view, cmd, cmdsize) @data_owner = data_owner @offset = offset @size = size end |
Instance Attribute Details
#data_owner ⇒ String (readonly)
Returns the name of the owner for this note.
1765 1766 1767 |
# File 'lib/macho/load_commands.rb', line 1765 def data_owner @data_owner end |
#offset ⇒ Integer (readonly)
Returns the offset, within the file, of the note.
1768 1769 1770 |
# File 'lib/macho/load_commands.rb', line 1768 def offset @offset end |
#size ⇒ Integer (readonly)
Returns the size, in bytes, of the note.
1771 1772 1773 |
# File 'lib/macho/load_commands.rb', line 1771 def size @size end |
Instance Method Details
#to_h ⇒ Hash
Returns a hash representation of this MachO::LoadCommands::NoteCommand.
1789 1790 1791 1792 1793 1794 1795 |
# File 'lib/macho/load_commands.rb', line 1789 def to_h { "data_owner" => data_owner, "offset" => offset, "size" => size, }.merge super end |