Class: InlineSvg::FindsAssetPaths

Inherits:
Object
  • Object
show all
Defined in:
lib/inline_svg/finds_asset_paths.rb

Class Method Summary collapse

Class Method Details

.by_filename(filename) ⇒ Object



3
4
5
6
# File 'lib/inline_svg/finds_asset_paths.rb', line 3

def self.by_filename(filename)
  asset = configured_asset_finder.find_asset(filename)
  asset.try(:pathname) || asset.try(:filename)
end

.configured_asset_finderObject



8
9
10
# File 'lib/inline_svg/finds_asset_paths.rb', line 8

def self.configured_asset_finder
  InlineSvg.configuration.asset_finder
end