Class: MachO::Headers::FatHeader
- Inherits:
-
MachOStructure
- Object
- MachOStructure
- MachO::Headers::FatHeader
- Defined in:
- lib/macho/headers.rb
Overview
Fat binary header structure
Instance Method Summary collapse
-
#magic ⇒ Integer
The magic number of the header (and file).
-
#nfat_arch ⇒ Integer
The number of fat architecture structures following the header.
-
#serialize ⇒ String
The serialized fields of the fat header.
-
#to_h ⇒ Hash
A hash representation of this FatHeader.
Methods inherited from MachOStructure
bytesize, format, #initialize, new_from_bin
Constructor Details
This class inherits a constructor from MachO::MachOStructure
Instance Method Details
#magic ⇒ Integer
Returns the magic number of the header (and file).
508 |
# File 'lib/macho/headers.rb', line 508 field :magic, :uint32, :endian => :big |
#nfat_arch ⇒ Integer
Returns the number of fat architecture structures following the header.
511 |
# File 'lib/macho/headers.rb', line 511 field :nfat_arch, :uint32, :endian => :big |
#serialize ⇒ String
Returns the serialized fields of the fat header.
514 515 516 |
# File 'lib/macho/headers.rb', line 514 def serialize [magic, nfat_arch].pack(self.class.format) end |
#to_h ⇒ Hash
Returns a hash representation of this MachO::Headers::FatHeader.
519 520 521 522 523 524 525 |
# File 'lib/macho/headers.rb', line 519 def to_h { "magic" => magic, "magic_sym" => MH_MAGICS[magic], "nfat_arch" => nfat_arch, }.merge super end |