Method: Amber::Render::Template#initialize

Defined in:
lib/amber/render/template.rb

#initialize(options = {}) ⇒ Template

Returns a new instance of Template.



33
34
35
36
37
38
39
40
41
42
# File 'lib/amber/render/template.rb', line 33

def initialize(options={})
  if options[:file]
    @file = options[:file]
    @type = options[:type] || type_from_file(@file)
  elsif options[:content]
    @content = options[:content]
    @type    = options[:type]      # e.g. :haml. required if @content
  end
  @partial = options[:partial]
end