Class: MachO::LoadCommands::BuildVersionCommand::ToolEntries::Tool

Inherits:
Object
  • Object
show all
Defined in:
lib/macho/load_commands.rb

Overview

An individual tool.

Instance Attribute Summary collapse

Instance Method Summary collapse

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.

Parameters:

  • tool (Integer) —

    32-bit integer

  • version (Integer) —

    32-bit integer



1282
1283
1284
1285
# File 'lib/macho/load_commands.rb', line 1282

def initialize(tool, version)
  @tool = tool
  @version = version
end

Instance Attribute Details

#tool ⇒ Integer (readonly)

Returns the enum for the tool.

Returns:

  • (Integer) —

    the enum for the tool



1274
1275
1276
# File 'lib/macho/load_commands.rb', line 1274

def tool
  @tool
end

#version ⇒ Integer (readonly)

Returns the tool's version number.

Returns:

  • (Integer) —

    the tool's version number



1277
1278
1279
# File 'lib/macho/load_commands.rb', line 1277

def version
  @version
end

Instance Method Details

#to_h ⇒ Hash

Returns a hash representation of this MachO::LoadCommands::BuildVersionCommand::ToolEntries::Tool.

Returns:



1288
1289
1290
1291
1292
1293
# File 'lib/macho/load_commands.rb', line 1288

def to_h
  {
    "tool" => tool,
    "version" => version,
  }
end