Module: Ramaze::View::Lokar

Defined in:
lib/ramaze/view/lokar.rb

Overview

Allows views to use Lokar as the template engine. See the following website for more information: github.com/Zoxc/Lokar

Class Method Summary collapse

Class Method Details

.call(action, string) ⇒ Object



10
11
12
13
14
15
# File 'lib/ramaze/view/lokar.rb', line 10

def self.call(action, string)
  compiled = View.compile(string){|s| ::Lokar.compile(s, action.view || __FILE__) }
  html = action.instance.instance_eval(&compiled).join

  return html, 'text/html'
end