Class: MachO::LoadCommands::BuildVersionCommand::ToolEntries
- Inherits:
-
Object
- Object
- MachO::LoadCommands::BuildVersionCommand::ToolEntries
- Defined in:
- lib/macho/load_commands.rb
Overview
A representation of the tool versions exposed
by a MachO::LoadCommands::BuildVersionCommand (LC_BUILD_VERSION
).
Defined Under Namespace
Classes: Tool
Instance Attribute Summary collapse
-
#tools ⇒ Array<Tool>
readonly
All tools.
Instance Method Summary collapse
-
#initialize(view, ntools) ⇒ ToolEntries
constructor
private
A new instance of ToolEntries.
Constructor Details
#initialize(view, ntools) ⇒ ToolEntries
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 ToolEntries.
1215 1216 1217 1218 1219 1220 1221 |
# File 'lib/macho/load_commands.rb', line 1215 def initialize(view, ntools) format = Utils.specialize_format("L=#{ntools * 2}", view.endianness) raw_table = view.raw_data[view.offset + 24, ntools * 8] blobs = raw_table.unpack(format).each_slice(2).to_a @tools = blobs.map { |b| Tool.new(*b) } end |
Instance Attribute Details
#tools ⇒ Array<Tool> (readonly)
Returns all tools.
1210 1211 1212 |
# File 'lib/macho/load_commands.rb', line 1210 def tools @tools end |