Class: ActionView::DependencyTracker::WildcardResolver
- Inherits:
-
Object
- Object
- ActionView::DependencyTracker::WildcardResolver
- Defined in:
- lib/action_view/dependency_tracker/wildcard_resolver.rb
Overview
:nodoc:
Instance Method Summary collapse
-
#initialize(view_paths, dependencies) ⇒ WildcardResolver
constructor
A new instance of WildcardResolver.
- #resolve ⇒ Object
Constructor Details
#initialize(view_paths, dependencies) ⇒ WildcardResolver
Returns a new instance of WildcardResolver.
6 7 8 9 10 11 |
# File 'lib/action_view/dependency_tracker/wildcard_resolver.rb', line 6 def initialize(view_paths, dependencies) @view_paths = view_paths @wildcard_dependencies, @explicit_dependencies = dependencies.partition { |dependency| dependency.end_with?("/*") } end |
Instance Method Details
#resolve ⇒ Object
13 14 15 16 17 |
# File 'lib/action_view/dependency_tracker/wildcard_resolver.rb', line 13 def resolve return explicit_dependencies.uniq if !view_paths || wildcard_dependencies.empty? (explicit_dependencies + resolved_wildcard_dependencies).uniq end |