File: view.rb

package info (click to toggle)
ruby-ramaze 2012.12.08-3
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 3,060 kB
  • ctags: 1,200
  • sloc: ruby: 10,446; makefile: 8
file content (35 lines) | stat: -rw-r--r-- 1,237 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#          Copyright (c) 2009 Michael Fellinger m.fellinger@gmail.com
# All files in this distribution are subject to the terms of the MIT license.

module Ramaze
  View = Innate::View

  # This is a container module for wrappers of templating engines and handles
  # lazy requiring of needed engines.
  module View
    # Combine Kernel#autoload and Innate::View::register
    def self.auto_register(name, *exts)
      autoload(name, "ramaze/view/#{name}".downcase)
      register("Innate::View::#{name}", *exts)
    end

    # Engines provided by Innate are:
    # ERB, Etanni, None
    auto_register :Erector,    :erector
    auto_register :Erubis,     :erubis,  :rhtml
    auto_register :Ezamar,     :zmr
    auto_register :Gestalt,    :ges
    auto_register :Haml,       :haml
    auto_register :Less,       :lss, :less
    auto_register :Liquid,     :liquid
    auto_register :Lokar,      :lok
    auto_register :Nagoro,     :nag
    auto_register :Remarkably, :rem
    auto_register :Sass,       :sass
    auto_register :Slim,       :slim
    auto_register :Tagz,       :tagz
    auto_register :Tenjin,     :rbhtml, :tenjin
    auto_register :Slippers,   :st
    auto_register :Mustache,   :mustache, :mt
  end # View
end # Ramaze