Class: Stool::Command::WorkSpace::List

Inherits:
Stool::Command::WorkSpace show all
Defined in:
lib/stool/Command/WorkSpace/list.rb

Instance Attribute Summary

Attributes inherited from Stool::Command::WorkSpace

#info, #tag

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Stool::Command::WorkSpace

#cleanAllCache, #existAtConfig?, #getAllRepos, #hasPodfile?, #pathForTaskInfo_last_pod_update, #validate!

Methods inherited from Stool::Command

#checkConfigFile, options, #pp

Constructor Details

#initialize(argv) ⇒ List

Returns a new instance of List.



15
16
17
# File 'lib/stool/Command/WorkSpace/list.rb', line 15

def initialize(argv)
  super
end

Class Method Details

.tasks_from_configObject



30
31
32
33
34
35
36
37
38
39
40
41
# File 'lib/stool/Command/WorkSpace/list.rb', line 30

def self.tasks_from_config
  arr = @@config.tasks
  arr.map do |obj|
    if obj.respond_to?('path')
      unless File.exist?(obj.path)
        puts "warning--> #{obj.path} not exist"
        arr.delete(obj)
      end
    end
  end
  arr
end

Instance Method Details

#runObject

查看当前的pool list



20
21
22
23
24
25
26
# File 'lib/stool/Command/WorkSpace/list.rb', line 20

def run
  pp('')
  pp('**WorkSpace list')
  List::tasks_from_config.map{|wp|
    wp.info_tos
  }
end