Class: ActionView::DependencyTracker

Inherits:
Object
  • Object
show all
Defined in:
actionview/lib/action_view/dependency_tracker.rb

Overview

:nodoc:

Defined Under Namespace

Classes: ERBTracker

Class Method Summary collapse

Class Method Details

.find_dependencies(name, template) ⇒ Object



7
8
9
10
11
12
13
14
15
# File 'actionview/lib/action_view/dependency_tracker.rb', line 7

def self.find_dependencies(name, template)
  tracker = @trackers[template.handler]

  if tracker.present?
    tracker.call(name, template)
  else
    []
  end
end

.register_tracker(extension, tracker) ⇒ Object



17
18
19
20
# File 'actionview/lib/action_view/dependency_tracker.rb', line 17

def self.register_tracker(extension, tracker)
  handler = Template.handler_for_extension(extension)
  @trackers[handler] = tracker
end

.remove_tracker(handler) ⇒ Object



22
23
24
# File 'actionview/lib/action_view/dependency_tracker.rb', line 22

def self.remove_tracker(handler)
  @trackers.delete(handler)
end