lib/origen/generator/renderer.rb in origen-0.7.5 vs lib/origen/generator/renderer.rb in origen-0.7.6

- old
+ new

@@ -2,10 +2,11 @@ class Generator # Handles the recursive rendering and importing of sub templates # and source files module Renderer def render(file, options = {}, &block) + fail 'File argument is nil' unless file file = Origen.file_handler.clean_path_to_sub_template(file) current_pipeline << { file: file, options: options, placeholder: placeholder, block: block, indent: options[:indent] || 0 } @@ -43,10 +44,11 @@ pipeline << [] @current_options = current[:options] self.current_buffer = '' output = compile(current[:file], sub_template: true, - block: current[:block] + block: current[:block], + scope: @scope ) if current[:indent] && current[:indent] > 0 indent = ' ' * current[:indent] output = output.split("\n").map { |l| indent + l }.join("\n") end