# File lib/rgen/template_language/directory_template_container.rb, line 33 def expand(template, *all_args) if template =~ /^\// if @parent # pass to parent @parent.expand(template, *all_args) else # this is root _expand(template, *all_args) end elsif template =~ /^\.\.\/(.*)/ if @parent # pass to parent @parent.expand($1, *all_args) else raise "No parent directory for root" end else _expand(template, *all_args) end end