Class: Octobuild::Builder
- Inherits:
-
Object
- Object
- Octobuild::Builder
- Defined in:
- lib/octobuild.rb
Instance Method Summary collapse
- #build(versions = nil) ⇒ Object
-
#initialize ⇒ Builder
constructor
A new instance of Builder.
Constructor Details
#initialize ⇒ Builder
Returns a new instance of Builder.
6 7 8 |
# File 'lib/octobuild.rb', line 6 def initialize @installer = XcodeInstall::Installer.new end |
Instance Method Details
#build(versions = nil) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/octobuild.rb', line 10 def build(versions = nil) versions = requested_versions if versions.nil? versions.each do |version| puts "Building with Xcode #{version}..." xcode = @installer.installed_versions.find { |x| x.version == version } if xcode.nil? puts 'Installing Xcode...' @installer.install_version(version, false) end system(command(xcode)) end end |