lib/reality/generators/generator.rb in reality-generators-1.9.0 vs lib/reality/generators/generator.rb in reality-generators-1.10.0
- old
+ new
@@ -35,9 +35,10 @@
# based on the specified templates.
# The traversal starts from a root element of specified element_type and
# traverses all elements that are contained transitively by the root element.
# The templates then generate files from traversed elements.
def generate(element_type, element, directory, templates, filter)
+ templates = load_templates_from_template_sets(templates) if templates.any? {|t| t.is_a?(Symbol)}
unprocessed_files = (Dir["#{directory}/**/*.*"] + Dir["#{directory}/**/*"]).uniq
Generators.debug "Templates to process: #{templates.collect { |t| t.name }.inspect}"
targets = {}