Class: Jasmine::AssetPipelineUtility

Inherits:
Object
  • Object
show all
Defined in:
lib/jasmine/asset_pipeline_utility.rb

Class Method Summary collapse

Class Method Details

.asset_path_for(filepath) ⇒ Object



7
8
9
# File 'lib/jasmine/asset_pipeline_utility.rb', line 7

def self.asset_path_for(filepath)
  context.asset_path(filepath)
end

.bundled_asset_factory(pathname, ext) ⇒ Object



3
4
5
# File 'lib/jasmine/asset_pipeline_utility.rb', line 3

def self.bundled_asset_factory(pathname, ext)
  context.asset_paths.asset_for(pathname, 'js')
end

.contextObject



11
12
13
14
15
16
# File 'lib/jasmine/asset_pipeline_utility.rb', line 11

def self.context
  return @context if @context
  @context = ::Rails.application.assets.context_class
  @context.extend(::Sprockets::Helpers::IsolatedHelper)
  @context.extend(::Sprockets::Helpers::RailsHelper)
end