Sha256: e5460a999dfb9f5bd0859ee2ad1589e0f44a199ba5d26f4cc6a8a4c58fe96091
Contents?: true
Size: 468 Bytes
Versions: 15
Compression:
Stored size: 468 Bytes
Contents
# encoding: utf-8 module Ace class DSL attr_accessor :rules, :generators def initialize @rules, @generators = Hash.new, Array.new end def rule(klass, *globs) paths = globs.map { |glob| Dir.glob("content/#{glob}") } files = paths.flatten.select { |path| File.file?(path) } self.rules[klass] ||= Array.new self.rules[klass].push(*files) end def generator(klass) self.generators << klass end end end
Version data entries
15 entries across 15 versions & 1 rubygems