Class: Stool::PoolInfo
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#path ⇒ Object
Returns the value of attribute path.
Instance Method Summary collapse
Methods inherited from BaseObj
#doCacheByYAML, fromFile, fromYAML, #initialize
Constructor Details
This class inherits a constructor from Stool::BaseObj
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
8 9 10 |
# File 'lib/stool/Core/PoolInfo.rb', line 8 def name @name end |
#path ⇒ Object
Returns the value of attribute path.
9 10 11 |
# File 'lib/stool/Core/PoolInfo.rb', line 9 def path @path end |
Instance Method Details
#info_tos ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/stool/Core/PoolInfo.rb', line 11 def info_tos puts('--' + 'name:'+ self.name) puts('--' + 'path:'+ self.path) puts('--' + 'libs:') subDirs.sort.each do |f| unless f['.'] puts ' ' + f.to_s end end puts('') end |
#searchLib(name) ⇒ Object
本地搜索一个lib
24 25 26 27 28 29 30 |
# File 'lib/stool/Core/PoolInfo.rb', line 24 def searchLib(name) libInfo = nil if subDirs.include?(name) libInfo = LibInfo::loadFromPath(File.join(@path,name)) end libInfo end |
#subDirs ⇒ Object
32 33 34 35 36 37 38 |
# File 'lib/stool/Core/PoolInfo.rb', line 32 def subDirs arr = [] if @path arr = Dir.entries(@path) end arr end |