class MachO::LoadCommands::LoadCommand::SerializationContext

Represents the contextual information needed by a load command to serialize itself correctly into a binary string.

Attributes

alignment[R]

@return [Integer] the constant alignment value used to pad the

serialized load command
endianness[R]

@return [Symbol] the endianness of the serialized load command

Public Class Methods

context_for(macho) click to toggle source

@param macho [MachO::MachOFile] the file to contextualize @return [SerializationContext] the

resulting context
# File lib/macho/load_commands.rb, line 374
def self.context_for(macho)
  new(macho.endianness, macho.alignment)
end
new(endianness, alignment) click to toggle source

@param endianness [Symbol] the endianness of the context @param alignment [Integer] the alignment of the context @api private

# File lib/macho/load_commands.rb, line 381
def initialize(endianness, alignment)
  @endianness = endianness
  @alignment = alignment
end