Sha256: 6fc347738f030860facb288166effefabfebbb438bcaf78aafb8e9c2cbedfbce
Contents?: true
Size: 515 Bytes
Versions: 2
Compression:
Stored size: 515 Bytes
Contents
module Hieracles module Registry extend self def farms(config) Dir.glob(format(config.classpath, '*')).sort.map do |f| sub = Regexp.new(".*#{config.classpath.sub(/%s/,'([^/]*)')}") f.sub(sub, "\\1") end end def nodes(config) Dir.glob(File.join(config.encpath, '*.yaml')).sort.map do |f| File.basename(f, '.yaml') end end def modules(config) Dir.glob(File.join(config.modulepath, '*')).sort.map do |f| File.basename(f) end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
hieracles-0.3.2 | lib/hieracles/registry.rb |
hieracles-0.3.1 | lib/hieracles/registry.rb |