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.



180
181
182
183
184
185
186
# File 'lib/cfer/core/stack.rb', line 180

def include_template(*files)
  include_base = options[: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