Class: LiquidAssets::Resolver
- Inherits:
-
ActionView::Resolver
- Object
- ActionView::Resolver
- LiquidAssets::Resolver
- Includes:
- Singleton
- Defined in:
- lib/liquid_assets/resolver.rb
Instance Method Summary collapse
- #clear_cache_for(expired_path) ⇒ Object
- #find_templates(name, prefix, partial, details) ⇒ Object
- #to_s ⇒ Object
Instance Method Details
#clear_cache_for(expired_path) ⇒ Object
24 25 26 27 28 29 30 31 32 |
# File 'lib/liquid_assets/resolver.rb', line 24 def clear_cache_for( expired_path ) @cached.each do |context, prefix_hash | prefix_hash.each do | prefix, name_hash | name_hash.delete_if{ | name, partial_hash | normalize_path( prefix, name ) == expired_path } end end end |
#find_templates(name, prefix, partial, details) ⇒ Object
14 15 16 17 18 19 20 21 22 |
# File 'lib/liquid_assets/resolver.rb', line 14 def find_templates(name, prefix, partial, details) source = Config.content_provider.call( name ) if false == source return [] else return [ make_template( source, normalize_path( prefix, name ), details, partial ) ] end end |
#to_s ⇒ Object
10 11 12 |
# File 'lib/liquid_assets/resolver.rb', line 10 def to_s 'LiquidAssets::Resolver' end |