Class: Stool::Command

Inherits:
CLAide::Command
  • Object
show all
Defined in:
lib/stool/Command.rb,
lib/stool/Command/Lib.rb,
lib/stool/Command/Repo.rb,
lib/stool/Command/LibPool.rb,
lib/stool/Command/WorkSpace.rb,
lib/stool/Command/LibPool/Add.rb,
lib/stool/Command/LibPool/List.rb,
lib/stool/Command/Lib/VersionAdd.rb,
lib/stool/Command/WorkSpace/list.rb,
lib/stool/Command/Repo/CacheClean.rb,
lib/stool/Command/WorkSpace/update.rb

Direct Known Subclasses

Lib, LibPool, Repo, WorkSpace

Defined Under Namespace

Classes: Lib, LibPool, Repo, WorkSpace

Constant Summary collapse

@@config =

配置中心

Config::loadConfig

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(argv) ⇒ Command

Returns a new instance of Command.



26
27
28
29
# File 'lib/stool/Command.rb', line 26

def initialize(argv)
  checkConfigFile
  super
end

Class Method Details

.optionsObject



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

def self.options
  [
    ['--silent', 'Show nothing'],
  ].concat(super)
end

Instance Method Details

#checkConfigFileObject

检测系统Config文件



51
52
53
# File 'lib/stool/Command.rb', line 51

def checkConfigFile

end

#pp(*args) ⇒ Object



44
45
46
47
48
# File 'lib/stool/Command.rb', line 44

def pp(*args)
    if args.inspect[1]
      puts args[0]
    end
end

#runObject



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

def run
  puts 'it works!!'

  cc = Config::loadConfig

  cc.pools.map do |x|

    puts x.path
    puts x.name
  end

end