123456789_123456789_123456789_123456789_123456789_

Class: ActionView::Template::Handlers::ERB::Erubi

Relationships & Source Files
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
self, Erubi::Engine
Instance Chain:
self, Erubi::Engine
Inherits: Erubi::Engine
  • ::Object
Defined in: actionview/lib/action_view/template/handlers/erb/erubi.rb

Constant Summary

Instance Method Summary

Instance Method Details

#evaluate(action_view_erb_handler_context)

[ GitHub ]

  
# File 'actionview/lib/action_view/template/handlers/erb/erubi.rb', line 26

def evaluate(action_view_erb_handler_context)
  src = @src
  view = Class.new(ActionView::Base) {
    include action_view_erb_handler_context._routes.url_helpers
    class_eval("define_method(:_template) { |local_assigns, output_buffer| #{src} }", defined?(@filename) ? @filename : "(erubi)", 0)
  }.empty
  view._run(:_template, nil, {}, ActionView::OutputBuffer.new)
end