module Jasmine::AssetExpander::Rails4Or5Or6AssetBundle::GetOriginalAssetsHelper

Public Instance Methods

get_javascript_assets(pathname) click to toggle source
# File lib/jasmine/asset_expander.rb, line 52
def get_javascript_assets(pathname)
  if asset = lookup_debug_asset(pathname, type: :javascript)
    if asset.respond_to?(:to_a)
      asset.to_a.map do |a|
        path_to_javascript(a.logical_path, debug: true)
      end
    else
      Array(path_to_javascript(asset.logical_path, debug: true))
    end
  else
    []
  end
end
get_stylesheet_assets(pathname) click to toggle source
# File lib/jasmine/asset_expander.rb, line 66
def get_stylesheet_assets(pathname)
  if asset = lookup_debug_asset(pathname, type: :stylesheet)
    if asset.respond_to?(:to_a)
      asset.to_a.map do |a|
        path_to_stylesheet(a.logical_path, debug: true)
      end
    else
      Array(path_to_stylesheet(asset.logical_path, debug: true))
    end
  else
    []
  end
end