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.
981 982 983 984 985 986 987 |
# File 'lib/macho/load_commands.rb', line 981 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.
975 976 977 |
# File 'lib/macho/load_commands.rb', line 975 def hints @hints end |