class InlineSvg::PropshaftAssetFinder
Public Class Methods
find_asset(filename)
click to toggle source
# File lib/inline_svg/propshaft_asset_finder.rb, line 3 def self.find_asset(filename) new(filename) end
new(filename)
click to toggle source
# File lib/inline_svg/propshaft_asset_finder.rb, line 7 def initialize(filename) @filename = filename end
Public Instance Methods
pathname()
click to toggle source
# File lib/inline_svg/propshaft_asset_finder.rb, line 11 def pathname asset_path = ::Rails.application.assets.load_path.find(@filename) asset_path.path unless asset_path.nil? end