Class: Jasmine::AssetPipelineMapper

Inherits:
Object
  • Object
show all
Defined in:
lib/jasmine/asset_pipeline_mapper.rb

Instance Method Summary collapse

Constructor Details

#initialize(config, asset_expander) ⇒ AssetPipelineMapper

Returns a new instance of AssetPipelineMapper.



4
5
6
7
# File 'lib/jasmine/asset_pipeline_mapper.rb', line 4

def initialize(config, asset_expander)
  @config = config
  @asset_expander = asset_expander
end

Instance Method Details

#map_src_paths(src_paths) ⇒ Object



9
10
11
12
13
14
# File 'lib/jasmine/asset_pipeline_mapper.rb', line 9

def map_src_paths(src_paths)
  src_paths.map do |src_path|
    expanded_assets = @asset_expander.call(@config.src_dir, src_path)
    expanded_assets.empty? ? src_path : expanded_assets
  end.flatten.uniq
end