Class: Workarea::SvgAssetFinder
- Inherits:
-
InlineSvg::StaticAssetFinder
- Object
- InlineSvg::StaticAssetFinder
- Workarea::SvgAssetFinder
- Defined in:
- lib/workarea/svg_asset_finder.rb
Overview
Find SVG assets for InlineSvg
in any asset path. Represents a single asset file.
Instance Method Summary collapse
-
#pathname ⇒ Pathname
Fully-qualified path to the asset.
Instance Method Details
#pathname ⇒ Pathname
Fully-qualified path to the asset. This is what’s read out in InlineSvg
to actually read the SVG file from disk. It attempts to find a static asset through the Sprockets manifest, but falls back to iterating through all gem folders for the correct path.
cannot be found.
12 13 14 15 16 17 18 |
# File 'lib/workarea/svg_asset_finder.rb', line 12 def pathname path = asset_pathname return path if path.present? return unless engine_root.present? engine_root.join(@filename) end |