Module: Ramaze::View::Tagz

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

Defined Under Namespace

Modules: Methods

Class Method Summary collapse

Class Method Details

.call(action, string) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
# File 'lib/ramaze/view/tagz.rb', line 6

def self.call(action, string)
  return string, 'text/html' unless action.view

  markup = "tagz{#{string}}"
  action.instance.extend(Ramaze::View::Tagz::Methods)
  binding = action.binding

  html = eval(markup, binding, action.view)

  return html, 'text/html'
end