Class: HamlAssets::HamlSprocketsEngine::LookupContext

Inherits:
ActionView::LookupContext
  • Object
show all
Defined in:
lib/haml_assets/haml_sprockets_engine.rb

Instance Method Summary collapse

Constructor Details

#initialize(haml_context, path) ⇒ LookupContext

Returns a new instance of LookupContext.



11
12
13
14
# File 'lib/haml_assets/haml_sprockets_engine.rb', line 11

def initialize(haml_context, path)
  super(path)
  @view_context = haml_context
end

Instance Method Details

#find_template(*args) ⇒ Object



16
17
18
19
20
# File 'lib/haml_assets/haml_sprockets_engine.rb', line 16

def find_template(*args)
  super.tap do |r|
    @view_context.depend_on(r.identifier)
  end
end