Class: MachO::LoadCommands::VersionMinCommand
- Inherits:
 - 
      LoadCommand
      
        
- Object
 - MachOStructure
 - LoadCommand
 - MachO::LoadCommands::VersionMinCommand
 
 
- Defined in:
 - lib/macho/load_commands.rb
 
Overview
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.
Instance Method Summary collapse
- 
  
    
      #sdk  ⇒ Integer 
    
    
  
  
  
  
  
  
  
  
  
    
The SDK version X.Y.Z packed as x16.y8.z8.
 - 
  
    
      #sdk_string  ⇒ String 
    
    
  
  
  
  
  
  
  
  
  
    
A string representation of the binary's SDK version.
 - 
  
    
      #to_h  ⇒ Hash 
    
    
  
  
  
  
  
  
  
  
  
    
A hash representation of this VersionMinCommand.
 - 
  
    
      #version  ⇒ Integer 
    
    
  
  
  
  
  
  
  
  
  
    
The version X.Y.Z packed as x16.y8.z8.
 - 
  
    
      #version_string  ⇒ String 
    
    
  
  
  
  
  
  
  
  
  
    
A string representation of the binary's minimum OS version.
 
Methods inherited from LoadCommand
#cmd, #cmdsize, create, new_from_bin, #offset, #serializable?, #serialize, #to_s, #type, #view
Methods inherited from MachOStructure
bytesize, format, #initialize, new_from_bin
Constructor Details
This class inherits a constructor from MachO::MachOStructure
Instance Method Details
#sdk ⇒ Integer
Returns the SDK version X.Y.Z packed as x16.y8.z8.
      1121  | 
    
      # File 'lib/macho/load_commands.rb', line 1121 field :sdk, :uint32  | 
  
#sdk_string ⇒ String
A string representation of the binary's SDK version.
      1136 1137 1138 1139 1140 1141 1142 1143  | 
    
      # File 'lib/macho/load_commands.rb', line 1136 def sdk_string binary = "%032<sdk>b" % { :sdk => sdk } segs = [ binary[0..15], binary[16..23], binary[24..31] ].map { |s| s.to_i(2) } segs.join(".") end  | 
  
#to_h ⇒ Hash
Returns a hash representation of this MachO::LoadCommands::VersionMinCommand.
      1146 1147 1148 1149 1150 1151 1152 1153  | 
    
      # File 'lib/macho/load_commands.rb', line 1146 def to_h { "version" => version, "version_string" => version_string, "sdk" => sdk, "sdk_string" => sdk_string, }.merge super end  | 
  
#version ⇒ Integer
Returns the version X.Y.Z packed as x16.y8.z8.
      1118  | 
    
      # File 'lib/macho/load_commands.rb', line 1118 field :version, :uint32  | 
  
#version_string ⇒ String
A string representation of the binary's minimum OS version.
      1125 1126 1127 1128 1129 1130 1131 1132  | 
    
      # File 'lib/macho/load_commands.rb', line 1125 def version_string binary = "%032<version>b" % { :version => version } segs = [ binary[0..15], binary[16..23], binary[24..31] ].map { |s| s.to_i(2) } segs.join(".") end  |