Namespace
Methods
M
N
R
S
U
Attributes
[RW] previously_last_modified
Class Public methods
new(*args)
# File actionpack/lib/action_view/reloadable_template.rb, line 80
def initialize(*args)
  super
  # we don't ever want to get frozen
  extend Unfreezable
end
Instance Public methods
mtime()
# File actionpack/lib/action_view/reloadable_template.rb, line 87
def mtime
  File.mtime(filename)
end
reset_cache_if_stale!()
# File actionpack/lib/action_view/reloadable_template.rb, line 100
def reset_cache_if_stale!
  if stale?
    flush_cache 'source', 'compiled_source'
    undef_my_compiled_methods!
    @previously_last_modified = mtime
  end
  self
end
stale?()
# File actionpack/lib/action_view/reloadable_template.rb, line 93
def stale?
  previously_last_modified.nil? || previously_last_modified < mtime
rescue Errno::ENOENT => e
  undef_my_compiled_methods!
  raise TemplateDeleted
end
undef_my_compiled_methods!()

remove any compiled methods that look like they might belong to me

# File actionpack/lib/action_view/reloadable_template.rb, line 110
def undef_my_compiled_methods!
  ActionView::Base::CompiledTemplates.public_instance_methods.grep(/#{Regexp.escape(method_name_without_locals)}(?:_locals_)?/).each do |m|
    ActionView::Base::CompiledTemplates.send(:remove_method, m)
  end
end