Method: ZergXcode::Builder::Sdk.all

Defined in:
lib/zerg_xcode/builder/sdks.rb

.allObject

All the SDKs installed.



16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'lib/zerg_xcode/builder/sdks.rb', line 16

def self.all
  return @all if @all
  
  output = `xcodebuild -showsdks`
  @all = []
  group = ''
  output.each_line do |line|
    if line.index '-sdk '
      name, arg = *line.split('-sdk ').map { |token| token.strip }
      @all << { :group => group, :name => name, :arg => arg }
    elsif line.index ':'
      group = line.split(':').first.strip
    end
  end
  @all
end