Class: ActionView::DependencyTracker
Do not use. This class is for internal use only.
Relationships & Source Files | |
Namespace Children | |
Classes:
| |
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
|
|
Inherits: | Object |
Defined in: | actionview/lib/action_view/dependency_tracker.rb, actionview/lib/action_view/dependency_tracker/erb_tracker.rb, actionview/lib/action_view/dependency_tracker/ruby_tracker.rb, actionview/lib/action_view/dependency_tracker/wildcard_resolver.rb |
Class Method Summary
- .find_dependencies(name, template, view_paths = nil)
- .register_tracker(extension, tracker)
- .remove_tracker(handler)
::ActiveSupport::Autoload
- Extended
Class Method Details
.find_dependencies(name, template, view_paths = nil)
[ GitHub ]# File 'actionview/lib/action_view/dependency_tracker.rb', line 17
def self.find_dependencies(name, template, view_paths = nil) tracker = @trackers[template.handler] return [] unless tracker tracker.call(name, template, view_paths) end
.register_tracker(extension, tracker)
[ GitHub ]# File 'actionview/lib/action_view/dependency_tracker.rb', line 24
def self.register_tracker(extension, tracker) handler = Template.handler_for_extension(extension) if tracker.respond_to?(:supports_view_paths?) @trackers[handler] = tracker else @trackers[handler] = lambda { |name, template, _| tracker.call(name, template) } end end
.remove_tracker(handler)
[ GitHub ]# File 'actionview/lib/action_view/dependency_tracker.rb', line 35
def self.remove_tracker(handler) @trackers.delete(handler) end