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.
177 178 179 180 181 182 183 |
# File 'lib/cfer/core/stack.rb', line 177 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 |