Class: MachO::LoadCommands::TwolevelHintsCommand::TwolevelHintsTable::TwolevelHint
- Inherits:
-
Object
- Object
- MachO::LoadCommands::TwolevelHintsCommand::TwolevelHintsTable::TwolevelHint
- Defined in:
- lib/macho/load_commands.rb
Overview
An individual two-level namespace lookup hint.
Instance Attribute Summary collapse
-
#isub_image ⇒ Integer
readonly
The index into the sub-images.
-
#itoc ⇒ Integer
readonly
The index into the table of contents.
Instance Method Summary collapse
-
#initialize(blob) ⇒ TwolevelHint
constructor
private
A new instance of TwolevelHint.
-
#to_h ⇒ Hash
A hash representation of this TwolevelHint.
Constructor Details
#initialize(blob) ⇒ TwolevelHint
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of TwolevelHint.
1113 1114 1115 1116 |
# File 'lib/macho/load_commands.rb', line 1113 def initialize(blob) @isub_image = blob >> 24 @itoc = blob & 0x00FFFFFF end |
Instance Attribute Details
#isub_image ⇒ Integer (readonly)
Returns the index into the sub-images.
1106 1107 1108 |
# File 'lib/macho/load_commands.rb', line 1106 def isub_image @isub_image end |
#itoc ⇒ Integer (readonly)
Returns the index into the table of contents.
1109 1110 1111 |
# File 'lib/macho/load_commands.rb', line 1109 def itoc @itoc end |
Instance Method Details
#to_h ⇒ Hash
Returns a hash representation of this MachO::LoadCommands::TwolevelHintsCommand::TwolevelHintsTable::TwolevelHint.
1119 1120 1121 1122 1123 1124 |
# File 'lib/macho/load_commands.rb', line 1119 def to_h { "isub_image" => isub_image, "itoc" => itoc, } end |