Class: DebugAssetMapper
- Inherits:
-
Object
- Object
- DebugAssetMapper
- Defined in:
- lib/middleman/jasmine/jasmine_sprockets_proxy.rb
Instance Attribute Summary collapse
-
#sprockets ⇒ Object
readonly
Returns the value of attribute sprockets.
Instance Method Summary collapse
-
#initialize(sprockets) ⇒ DebugAssetMapper
constructor
A new instance of DebugAssetMapper.
- #map_spec_paths(spec_paths) ⇒ Object
Constructor Details
#initialize(sprockets) ⇒ DebugAssetMapper
Returns a new instance of DebugAssetMapper.
86 87 88 |
# File 'lib/middleman/jasmine/jasmine_sprockets_proxy.rb', line 86 def initialize(sprockets) @sprockets = sprockets end |
Instance Attribute Details
#sprockets ⇒ Object (readonly)
Returns the value of attribute sprockets.
85 86 87 |
# File 'lib/middleman/jasmine/jasmine_sprockets_proxy.rb', line 85 def sprockets @sprockets end |
Instance Method Details
#map_spec_paths(spec_paths) ⇒ Object
90 91 92 93 94 95 96 |
# File 'lib/middleman/jasmine/jasmine_sprockets_proxy.rb', line 90 def map_spec_paths(spec_paths) spec_paths.map do |path| sprockets[File.basename(path)].to_a.map do | dependency | "/__spec__/#{dependency.logical_path}?body=t" end end.flatten.uniq end |