Method: Cfer::Core::Stack#include_template
- Defined in:
- lib/cfer/core/stack.rb
#include_template(*files) ⇒ Object
Includes template code from one or more files, and evals it in the context of this stack. Filenames are relative to the file containing the invocation of this method.
172 173 174 175 176 177 178 |
# File 'lib/cfer/core/stack.rb', line 172 def include_template(*files) include_base = [:include_base] || File.dirname(caller.first.split(/:\d/,2).first) files.each do |file| path = File.join(include_base, file) include_file(path) end end |