Methods
Public Class methods
[ show source ]
# File actionpack/lib/action_view/reloadable_template.rb, line 9 9: def initialize(path) 10: super 11: @paths = {} 12: new_request! 13: end
Public Instance methods
[ show source ]
# File actionpack/lib/action_view/reloadable_template.rb, line 20 20: def [](path) 21: if found_template = @paths[path] 22: begin 23: found_template.reset_cache_if_stale! 24: rescue TemplateDeleted 25: unregister_template(found_template) 26: self[path] 27: end 28: else 29: load_all_templates_from_dir(templates_dir_from_path(path)) 30: # don't ever hand out a template without running a stale check 31: (new_template = @paths[path]) && new_template.reset_cache_if_stale! 32: end 33: end
This method is also aliased as
load!
[ show source ]
# File actionpack/lib/action_view/reloadable_template.rb, line 15 15: def new_request! 16: @disk_cache = {} 17: end