Method: Magento::Import::ImageFinder#find_by_name
- Defined in:
- lib/magento/import/image_finder.rb
#find_by_name(name) ⇒ Object
10 11 12 13 14 15 |
# File 'lib/magento/import/image_finder.rb', line 10 def find_by_name(name) prefix = "#{@images_folder}/#{name}" EXTENTIONS.map { |e| ["#{prefix}.#{e}", "#{prefix}.#{e.upcase}"] }.flatten .find { |file| File.exist?(file) } end |