Module: Innate::View::ERB

Defined in:
lib/innate/view/erb.rb

Class Method Summary collapse

Class Method Details

.call(action, string) ⇒ Object



6
7
8
9
10
11
12
# File 'lib/innate/view/erb.rb', line 6

def self.call(action, string)
  erb = ::ERB.new(string.to_s, nil, '%<>')
  erb.filename = (action.view || action.method).to_s
  html = erb.result(action.binding)

  return html, 'text/html'
end