module Sprockets::URIUtils
def valid_asset_uri?(str)
str - Possible String asset URI.
Internal: Check if String is a valid Asset URI.
def valid_asset_uri?(str) # Quick prefix check before attempting a full parse str.start_with?("file://") && parse_asset_uri(str) ? true : false rescue URI::InvalidURIError false end