Class: Wunderbar::Template::Html
- Defined in:
- lib/wunderbar/sinatra.rb
Direct Known Subclasses
Instance Method Summary collapse
Methods inherited from Base
engine_initialized?, evaluate, #initialize_engine, #precompiled_postamble, #precompiled_preamble, #precompiled_template, #prepare
Instance Method Details
#evaluate(scope, locals, &block) ⇒ Object
100 101 102 103 104 105 106 107 108 109 110 111 112 113 |
# File 'lib/wunderbar/sinatra.rb', line 100 def evaluate(scope, locals, &block) builder = HtmlMarkup.new(scope) begin _evaluate(builder, scope, locals, &block) rescue Exception => exception scope.response.status = Wunderbar::ServerError.status builder.clear! builder.html do _h1 'Internal Server Error' _exception exception end end builder._.target! end |