Class: XcodeInstall::Command::List
- Inherits:
-
XcodeInstall::Command
- Object
- CLAide::Command
- XcodeInstall::Command
- XcodeInstall::Command::List
- Defined in:
- lib/xcode/install/list.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(argv) ⇒ List
constructor
A new instance of List.
- #run ⇒ Object
Methods inherited from XcodeInstall::Command
Constructor Details
#initialize(argv) ⇒ List
Returns a new instance of List.
11 12 13 14 |
# File 'lib/xcode/install/list.rb', line 11 def initialize(argv) @all = argv.flag?('all', false) super end |
Class Method Details
.options ⇒ Object
7 8 9 |
# File 'lib/xcode/install/list.rb', line 7 def self. [['--all', 'Show all available versions.']].concat(super) end |
Instance Method Details
#run ⇒ Object
16 17 18 19 20 21 22 23 24 |
# File 'lib/xcode/install/list.rb', line 16 def run installer = XcodeInstall::Installer.new if @all puts installer.list else puts installer.list_current end end |