class MachO::LoadCommands::VersionMinCommand

A load command containing the minimum OS version on which the binary was built to run. Corresponds to LC_VERSION_MIN_MACOSX and LC_VERSION_MIN_IPHONEOS.

Constants

FORMAT

@see MachOStructure::FORMAT @api private

SIZEOF

@see MachOStructure::SIZEOF @api private

Attributes

sdk[R]

@return [Fixnum] the SDK version X.Y.Z packed as x16.y8.z8

version[R]

@return [Fixnum] the version X.Y.Z packed as x16.y8.z8

Public Class Methods

new(view, cmd, cmdsize, version, sdk) click to toggle source

@api private

Calls superclass method MachO::LoadCommands::LoadCommand::new
# File lib/macho/load_commands.rb, line 1093
def initialize(view, cmd, cmdsize, version, sdk)
  super(view, cmd, cmdsize)
  @version = version
  @sdk = sdk
end

Public Instance Methods

sdk_string() click to toggle source

A string representation of the binary's SDK version. @return [String] a string representing the SDK version.

# File lib/macho/load_commands.rb, line 1112
def sdk_string
  binary = "%032b" % sdk
  segs = [
    binary[0..15], binary[16..23], binary[24..31]
  ].map { |s| s.to_i(2) }

  segs.join(".")
end
version_string() click to toggle source

A string representation of the binary's minimum OS version. @return [String] a string representing the minimum OS version.

# File lib/macho/load_commands.rb, line 1101
def version_string
  binary = "%032b" % version
  segs = [
    binary[0..15], binary[16..23], binary[24..31]
  ].map { |s| s.to_i(2) }

  segs.join(".")
end