Module: Temple::Templates

Defined in:
lib/temple/templates.rb,
lib/temple/templates/tilt.rb,
lib/temple/templates/rails.rb

Defined Under Namespace

Classes: Rails, Tilt

Class Method Summary collapse

Class Method Details

.method_missing(name, engine, options = {}) ⇒ Object



7
8
9
10
11
12
13
# File 'lib/temple/templates.rb', line 7

def self.method_missing(name, engine, options = {})
  template = Class.new(const_get(name))
  template.engine(engine)
  template.register_as(options[:register_as]) if options[:register_as]
  template.default_options.update(options)
  template
end