Class: JsDependency::SourceAnalysis::Leave
- Inherits:
-
Object
- Object
- JsDependency::SourceAnalysis::Leave
- Defined in:
- lib/js_dependency/source_analysis/leave.rb
Overview
Components have no dependencies.
Instance Method Summary collapse
- #call ⇒ Array<String>
-
#initialize(index, src_path) ⇒ Leave
constructor
A new instance of Leave.
Constructor Details
#initialize(index, src_path) ⇒ Leave
Returns a new instance of Leave.
10 11 12 13 |
# File 'lib/js_dependency/source_analysis/leave.rb', line 10 def initialize(index, src_path) @index = index @src_path = src_path end |
Instance Method Details
#call ⇒ Array<String>
16 17 18 19 20 21 22 23 24 25 |
# File 'lib/js_dependency/source_analysis/leave.rb', line 16 def call left_index = @index.filter do |_target_path, child_paths| blank?(child_paths) end left_index = left_index.transform_keys do |target_path| relative_path_or_external_path(target_path, @src_path) end left_index.keys.uniq.sort end |