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(={}) if [:file] @file = [:file] @type = [:type] || type_from_file(@file) elsif [:content] @content = [:content] @type = [:type] # e.g. :haml. required if @content end @partial = [:partial] end |