Class: MachO::LoadCommands::TwolevelHintsCommand::TwolevelHintsTable::TwolevelHint

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

Overview

An individual two-level namespace lookup hint.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(blob) ⇒ TwolevelHint

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 TwolevelHint.

Parameters:

  • blob (Integer)

    the 32-bit number containing the lookup hint



1005
1006
1007
1008
# File 'lib/macho/load_commands.rb', line 1005

def initialize(blob)
  @isub_image = blob >> 24
  @itoc = blob & 0x00FFFFFF
end

Instance Attribute Details

#isub_imageInteger (readonly)

Returns the index into the sub-images.

Returns:

  • (Integer)

    the index into the sub-images



998
999
1000
# File 'lib/macho/load_commands.rb', line 998

def isub_image
  @isub_image
end

#itocInteger (readonly)

Returns the index into the table of contents.

Returns:

  • (Integer)

    the index into the table of contents



1001
1002
1003
# File 'lib/macho/load_commands.rb', line 1001

def itoc
  @itoc
end

Instance Method Details

#to_hHash

Returns:



1011
1012
1013
1014
1015
1016
# File 'lib/macho/load_commands.rb', line 1011

def to_h
  {
    "isub_image" => isub_image,
    "itoc" => itoc,
  }
end