Module: Amp::KernelMethods
- Defined in:
- lib/amp-core/templates/template.rb
Instance Method Summary collapse
Instance Method Details
#template(name, type, text) ⇒ Object #template(name, text) ⇒ Object
193 194 195 196 197 198 199 200 |
# File 'lib/amp-core/templates/template.rb', line 193 def template(name, *args) if args.size > 2 || args.empty? raise ArgumentError.new('Usage of template: template(name, text)'+ 'or template(name, renderer, text)') end template = (args.size > 1) ? args[0] : :erb Support::Template.new(:all, name, template, args.last) end |