Class: ActionView::DependencyTracker::RubyTracker

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

Overview

:nodoc:

Constant Summary collapse

EXPLICIT_DEPENDENCY =
/# Template Dependency: (\S+)/

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, template, view_paths = nil, parser_class: RenderParser::Default) ⇒ RubyTracker

Returns a new instance of RubyTracker.



20
21
22
23
# File 'lib/action_view/dependency_tracker/ruby_tracker.rb', line 20

def initialize(name, template, view_paths = nil, parser_class: RenderParser::Default)
  @name, @template, @view_paths = name, template, view_paths
  @parser_class = parser_class
end

Class Method Details

.call(name, template, view_paths = nil) ⇒ Object



8
9
10
# File 'lib/action_view/dependency_tracker/ruby_tracker.rb', line 8

def self.call(name, template, view_paths = nil)
  new(name, template, view_paths).dependencies
end

.supports_view_paths?Boolean

:nodoc:

Returns:

  • (Boolean)


16
17
18
# File 'lib/action_view/dependency_tracker/ruby_tracker.rb', line 16

def self.supports_view_paths? # :nodoc:
  true
end

Instance Method Details

#dependenciesObject



12
13
14
# File 'lib/action_view/dependency_tracker/ruby_tracker.rb', line 12

def dependencies
  WildcardResolver.new(view_paths, render_dependencies + explicit_dependencies).resolve
end