Sha256: 369519857ba042bc5d98beeb333022b182876dfa4e0c4161256feea89b00b7af

Contents?: true

Size: 498 Bytes

Versions: 8

Compression:

Stored size: 498 Bytes

Contents

module Hieracles
  module Registry
  	extend self

  	def farms(config)
  		@_farms ||= Dir.glob(File.join(config.basepath, format(config.classpath, '*'))).sort
  	end

  	def nodes(config)
  		@_nodes ||= Dir.glob(File.join(config.basepath, config.encpath, '*.yaml')).sort.map do |f|
  			File.basename(f, '.yaml')
  		end
  	end

  	def modules(config)
  		@_modules ||= Dir.glob(File.join(config.basepath, config.modulepath, '*')).sort.map do |f|
  			File.basename(f)
  		end
  	end

	end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
hieracles-0.1.7 lib/hieracles/registry.rb
hieracles-0.1.6 lib/hieracles/registry.rb
hieracles-0.1.5 lib/hieracles/registry.rb
hieracles-0.1.4 lib/hieracles/registry.rb
hieracles-0.1.3 lib/hieracles/registry.rb
hieracles-0.1.2 lib/hieracles/registry.rb
hieracles-0.1.1 lib/hieracles/registry.rb
hieracles-0.1.0 lib/hieracles/registry.rb