Class: MachO::UUIDCommand

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

Overview

A load command containing a single 128-bit unique random number identifying an object produced by static link editor. Corresponds to LC_UUID.

Instance Attribute Summary collapse

Attributes inherited from LoadCommand

#cmd, #cmdsize, #offset

Instance Method Summary collapse

Methods inherited from LoadCommand

new_from_bin, #to_s

Methods inherited from MachOStructure

bytesize, new_from_bin

Constructor Details

#initialize(offset, cmd, cmdsize, uuid) ⇒ UUIDCommand

Returns a new instance of UUIDCommand.



337
338
339
340
# File 'lib/macho/load_commands.rb', line 337

def initialize(offset, cmd, cmdsize, uuid)
  super(offset, cmd, cmdsize)
  @uuid = uuid.unpack("C16") # re-unpack for the actual UUID array
end

Instance Attribute Details

#uuidArray<Fixnum> (readonly)

Returns the UUID.

Returns:

  • (Array<Fixnum>)

    the UUID



331
332
333
# File 'lib/macho/load_commands.rb', line 331

def uuid
  @uuid
end