class Tilt::Template
def initialize(file=nil, line=1, options={}, &block)
The #initialize_engine method is called if this is the very first
file is nil, a block is required.
is given, it should read template data and return as a String. When
default, template data is read from the file specified. When a block
Create a new template with the file, line, and options specified. By
def initialize(file=nil, line=1, options={}, &block) raise ArgumentError, "file or block required" if file.nil? && block.nil? options, line = line, 1 if line.is_a?(Hash) @file = file @line = line || 1 @options = options || {} @reader = block || lambda { |t| File.read(file) } @data = nil if !self.class.engine_initialized initialize_engine self.class.engine_initialized = true end end