Class: Qricker::ModuleCache
- Inherits:
-
Object
- Object
- Qricker::ModuleCache
- Defined in:
- lib/qricker/module_cache.rb
Instance Attribute Summary collapse
-
#allModules ⇒ Object
Returns the value of attribute allModules.
Instance Method Summary collapse
-
#initialize(rctlFile) ⇒ ModuleCache
constructor
A new instance of ModuleCache.
- #moduleByName(name) ⇒ Object
Constructor Details
#initialize(rctlFile) ⇒ ModuleCache
Returns a new instance of ModuleCache.
7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/qricker/module_cache.rb', line 7 def initialize(rctlFile) config = ParseConfig.new(rctlFile) if config.nil? Error("RCTL file is invalid!!!") end allSpecs = [] config.get_groups.each {|group| allSpecs << RickerSpec.new(group, config[group]["PATH"]) } @allModules = allSpecs end |
Instance Attribute Details
#allModules ⇒ Object
Returns the value of attribute allModules.
6 7 8 |
# File 'lib/qricker/module_cache.rb', line 6 def allModules @allModules end |
Instance Method Details
#moduleByName(name) ⇒ Object
20 21 22 23 24 25 26 27 28 |
# File 'lib/qricker/module_cache.rb', line 20 def moduleByName(name) specModuel = nil @allModules.each { |sm| if sm.name == name specModuel = sm end } return specModuel end |