class MachO::LoadCommands::RpathCommand
A load command representing an rpath, which specifies a path that should be added to the current run path used to find @rpath prefixed dylibs. Corresponds to LC_RPATH.
Public Instance Methods
serialize(context)
click to toggle source
@param context [SerializationContext] the context @return [String] the serialized fields of the load command @api private
# File lib/macho/load_commands.rb, line 1039 def serialize(context) format = Utils.specialize_format(self.class.format, context.endianness) string_payload, string_offsets = Utils.pack_strings(self.class.bytesize, context.alignment, :path => path.to_s) cmdsize = self.class.bytesize + string_payload.bytesize [cmd, cmdsize, string_offsets[:path]].pack(format) + string_payload end
to_h()
click to toggle source
@return [Hash] a hash representation of this {RpathCommand}
Calls superclass method
MachO::LoadCommands::LoadCommand#to_h
# File lib/macho/load_commands.rb, line 1049 def to_h { "path" => path.to_h, }.merge super end