Class: ActionView::Template::Inline

Inherits:
Template
  • Object
show all
Defined in:
lib/action_view/template/inline.rb

Overview

:nodoc:

Constant Summary collapse

Finalizer =

This finalizer is needed (and exactly with a proc inside another proc) otherwise templates leak in development.

proc do |method_name, mod| # :nodoc:
  proc do
    mod.module_eval do
      remove_possible_method method_name
    end
  end
end

Instance Method Summary collapse

Instance Method Details

#compile(mod) ⇒ Object



16
17
18
19
# File 'lib/action_view/template/inline.rb', line 16

def compile(mod)
  super
  ObjectSpace.define_finalizer(self, Finalizer[method_name, mod])
end