Module: Ramaze::View::Remarkably

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

Class Method Summary collapse

Class Method Details

.call(action, string) ⇒ Object



7
8
9
10
11
12
# File 'lib/ramaze/view/remarkably.rb', line 7

def self.call(action, string)
  string = transform_string(action, string) if action.view
  html = string.to_s

  return html, 'text/html'
end

.transform_string(action, string) ⇒ Object



14
15
16
17
18
19
# File 'lib/ramaze/view/remarkably.rb', line 14

def self.transform_string(action, string)
  action.instance.instance_eval do
    args = action.params
    instance_eval(string)
  end
end