Class: MachO::FatArch
- Inherits:
-
MachOStructure
- Object
- MachOStructure
- MachO::FatArch
- Defined in:
- lib/macho/headers.rb
Overview
Fat binary header architecture structure. A Fat binary has one or more of these, representing one or more internal Mach-O blobs.
Constant Summary collapse
- FORMAT =
"VVVVV"- SIZEOF =
20
Instance Attribute Summary collapse
-
#align ⇒ Fixnum
readonly
The alignment, as a power of 2.
-
#cpusubtype ⇒ Fixnum
readonly
The CPU subtype of the Mach-O.
-
#cputype ⇒ Fixnum
readonly
The CPU type of the Mach-O.
-
#offset ⇒ Fixnum
readonly
The file offset to the beginning of the Mach-O data.
-
#size ⇒ Fixnum
readonly
The size, in bytes, of the Mach-O data.
Instance Method Summary collapse
-
#initialize(cputype, cpusubtype, offset, size, align) ⇒ FatArch
constructor
private
A new instance of FatArch.
Methods inherited from MachOStructure
Constructor Details
#initialize(cputype, cpusubtype, offset, size, align) ⇒ FatArch
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 FatArch.
278 279 280 281 282 283 284 |
# File 'lib/macho/headers.rb', line 278 def initialize(cputype, cpusubtype, offset, size, align) @cputype = cputype @cpusubtype = cpusubtype @offset = offset @size = size @align = align end |
Instance Attribute Details
#align ⇒ Fixnum (readonly)
Returns the alignment, as a power of 2.
272 273 274 |
# File 'lib/macho/headers.rb', line 272 def align @align end |
#cpusubtype ⇒ Fixnum (readonly)
Returns the CPU subtype of the Mach-O.
263 264 265 |
# File 'lib/macho/headers.rb', line 263 def cpusubtype @cpusubtype end |
#cputype ⇒ Fixnum (readonly)
Returns the CPU type of the Mach-O.
260 261 262 |
# File 'lib/macho/headers.rb', line 260 def cputype @cputype end |
#offset ⇒ Fixnum (readonly)
Returns the file offset to the beginning of the Mach-O data.
266 267 268 |
# File 'lib/macho/headers.rb', line 266 def offset @offset end |
#size ⇒ Fixnum (readonly)
Returns the size, in bytes, of the Mach-O data.
269 270 271 |
# File 'lib/macho/headers.rb', line 269 def size @size end |