Sha256: 2f857f743d9aae4ecb831b69b05c3fab68a4bc1ef505138fe476a231f0878ee8

Contents?: true

Size: 483 Bytes

Versions: 1

Compression:

Stored size: 483 Bytes

Contents

module Hieracles
  class Farm

    def initialize(name, config)
      @name = name
      @config = config
    end

    def nodes()
    end

    def modules()
      regex = Regexp.new('\s*include\s*([-_a-z0-9]*)')
      extract_path = Regexp.new(".*#{@config.classpath.sub(/%s/,'([^/]*)')}")
      Dir.glob(format(@config.classpath, '*')).sort.reduce({}) do |a, f|
        name = f.sub(extract_path, "\\1")
        a[name] = find_item(f, regex)
        a
      end
    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
hieracles-0.4.2 lib/hieracles/farm.rb