Class: MachO::LoadCommands::TwolevelHintsCommand::TwolevelHintsTable
- Inherits:
-
Object
- Object
- MachO::LoadCommands::TwolevelHintsCommand::TwolevelHintsTable
- Defined in:
- lib/macho/load_commands.rb
Overview
A representation of the two-level namespace lookup hints table exposed
by a MachO::LoadCommands::TwolevelHintsCommand (LC_TWOLEVEL_HINTS
).
Defined Under Namespace
Classes: TwolevelHint
Instance Attribute Summary collapse
-
#hints ⇒ Array<TwolevelHint>
readonly
All hints in the table.
Instance Method Summary collapse
-
#initialize(view, htoffset, nhints) ⇒ TwolevelHintsTable
constructor
private
A new instance of TwolevelHintsTable.
Constructor Details
#initialize(view, htoffset, nhints) ⇒ TwolevelHintsTable
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 TwolevelHintsTable.
882 883 884 885 886 887 888 |
# File 'lib/macho/load_commands.rb', line 882 def initialize(view, htoffset, nhints) format = Utils.specialize_format("L=#{nhints}", view.endianness) raw_table = view.raw_data[htoffset, nhints * 4] blobs = raw_table.unpack(format) @hints = blobs.map { |b| TwolevelHint.new(b) } end |
Instance Attribute Details
#hints ⇒ Array<TwolevelHint> (readonly)
Returns all hints in the table.
876 877 878 |
# File 'lib/macho/load_commands.rb', line 876 def hints @hints end |