Class: MachO::LoadCommands::BuildVersionCommand::ToolEntries::Tool
- Inherits:
-
Object
- Object
- MachO::LoadCommands::BuildVersionCommand::ToolEntries::Tool
- Defined in:
- lib/macho/load_commands.rb
Overview
An individual tool.
Instance Attribute Summary collapse
-
#tool ⇒ Integer
readonly
The enum for the tool.
-
#version ⇒ Integer
readonly
The tool's version number.
Instance Method Summary collapse
-
#initialize(tool, version) ⇒ Tool
constructor
private
A new instance of Tool.
-
#to_h ⇒ Hash
A hash representation of this Tool.
Constructor Details
#initialize(tool, version) ⇒ Tool
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 Tool.
1234 1235 1236 1237 |
# File 'lib/macho/load_commands.rb', line 1234 def initialize(tool, version) @tool = tool @version = version end |
Instance Attribute Details
#tool ⇒ Integer (readonly)
Returns the enum for the tool.
1226 1227 1228 |
# File 'lib/macho/load_commands.rb', line 1226 def tool @tool end |
#version ⇒ Integer (readonly)
Returns the tool's version number.
1229 1230 1231 |
# File 'lib/macho/load_commands.rb', line 1229 def version @version end |
Instance Method Details
#to_h ⇒ Hash
Returns a hash representation of this MachO::LoadCommands::BuildVersionCommand::ToolEntries::Tool.
1240 1241 1242 1243 1244 1245 |
# File 'lib/macho/load_commands.rb', line 1240 def to_h { "tool" => tool, "version" => version, } end |