Module: Warbler::PathmapHelper

Included in:
Jar, Traits::Bundler, Traits::Gemspec, Traits::JBundler, Traits::NoGemspec, Traits::War
Defined in:
lib/warbler/pathmap_helper.rb

Instance Method Summary collapse

Instance Method Details

#apply_pathmaps(config, file, pathmaps) ⇒ Object


10
11
12
13
14
15
16
17
18
# File 'lib/warbler/pathmap_helper.rb', line 10

def apply_pathmaps(config, file, pathmaps)
  file = file.to_s
  file = file[2..-1] if file =~ /^\.\//
  pathmaps = config.pathmaps.send(pathmaps)
  pathmaps.each do |p|
    file = file.pathmap(p)
  end if pathmaps
  file
end