Sha256: ee641a26e8e056095121a428e972a33133433ede329524708bc0111f89521553

Contents?: true

Size: 337 Bytes

Versions: 7

Compression:

Stored size: 337 Bytes

Contents

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

    def self.configured_asset_finder
      Thread.current[:inline_svg_asset_finder] || InlineSvg.configuration.asset_finder
    end
  end
end

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
inline_svg-1.10.0 lib/inline_svg/finds_asset_paths.rb
inline_svg-1.9.0 lib/inline_svg/finds_asset_paths.rb
inline_svg-1.8.0 lib/inline_svg/finds_asset_paths.rb
rails_mini_profiler-0.2.0 vendor/bundle/ruby/3.0.0/gems/inline_svg-1.7.2/lib/inline_svg/finds_asset_paths.rb
inline_svg-1.7.2 lib/inline_svg/finds_asset_paths.rb
inline_svg-1.7.1 lib/inline_svg/finds_asset_paths.rb
inline_svg-1.7.0 lib/inline_svg/finds_asset_paths.rb