Parent

Class/Module Index [+]

Quicksearch

ActionView::ReloadableTemplate::ReloadablePath

Public Class Methods

new(path) click to toggle source
# File lib/action_view/reloadable_template.rb, line 9
def initialize(path)
  super
  @paths = {}
  new_request!
end

Public Instance Methods

[](path) click to toggle source
# File lib/action_view/reloadable_template.rb, line 20
def [](path)
  if found_template = @paths[path]
    begin
      found_template.reset_cache_if_stale!
    rescue TemplateDeleted
      unregister_template(found_template)
      self[path]
    end
  else
    load_all_templates_from_dir(templates_dir_from_path(path))
    # don't ever hand out a template without running a stale check
    (new_template = @paths[path]) && new_template.reset_cache_if_stale!
  end
end
load!() click to toggle source
Alias for: new_request!
new_request!() click to toggle source
# File lib/action_view/reloadable_template.rb, line 15
def new_request!
  @disk_cache = {}
end
Also aliased as: load!

[Validate]

Generated with the Darkfish Rdoc Generator 2.