Class: MachO::FatHeader

Inherits:
MachOStructure show all
Defined in:
lib/macho/headers.rb

Overview

Fat binary header structure

See Also:

Constant Summary collapse

FORMAT =
"VV"
SIZEOF =
8

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from MachOStructure

bytesize, new_from_bin

Constructor Details

#initialize(magic, nfat_arch) ⇒ FatHeader

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



249
250
251
252
# File 'lib/macho/headers.rb', line 249

def initialize(magic, nfat_arch)
	@magic = magic
	@nfat_arch = nfat_arch
end

Instance Attribute Details

#magicFixnum (readonly)

Returns the magic number of the header (and file).

Returns:

  • (Fixnum)

    the magic number of the header (and file)



240
241
242
# File 'lib/macho/headers.rb', line 240

def magic
  @magic
end

#nfat_archFixnum (readonly)

Returns the number of fat architecture structures following the header.

Returns:

  • (Fixnum)

    the number of fat architecture structures following the header



243
244
245
# File 'lib/macho/headers.rb', line 243

def nfat_arch
  @nfat_arch
end