Class: XcodeInstall::Command::Simulators

Inherits:
XcodeInstall::Command show all
Defined in:
lib/xcode/install/simulators.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from XcodeInstall::Command

#install, #list

Constructor Details

#initialize(argv) ⇒ Simulators

Returns a new instance of Simulators.



16
17
18
19
20
21
22
23
# File 'lib/xcode/install/simulators.rb', line 16

def initialize(argv)
  @installed_xcodes = Installer.new.installed_versions
  @install = argv.option('install')
  @force = argv.flag?('force', false)
  @should_install = argv.flag?('install', true)
  @progress = argv.flag?('progress', true)
  super
end

Class Method Details

.optionsObject



9
10
11
12
13
14
# File 'lib/xcode/install/simulators.rb', line 9

def self.options
  [['--install=name', 'Install simulator beginning with name, e.g. \'iOS 8.4\', \'tvOS 9.0\'.'],
   ['--force', 'Install even if the same version is already installed.'],
   ['--no-install', 'Only download DMG, but do not install it.'],
   ['--no-progress', 'Don’t show download progress.']].concat(super)
end

Instance Method Details

#runObject



25
26
27
# File 'lib/xcode/install/simulators.rb', line 25

def run
  @install ? install : list
end