class InlineSvg::AssetFile

Constants

UNREADABLE_PATH

Public Class Methods

named(filename) click to toggle source
# File lib/inline_svg/asset_file.rb, line 6
def self.named(filename)
  asset_path = FindsAssetPaths.by_filename(filename)
  File.read(asset_path || UNREADABLE_PATH)
rescue Errno::ENOENT
  raise FileNotFound.new("Asset not found: #{asset_path}")
end