Class: JqueryExpandAssets::JqueryExpandProcessor
- Inherits:
-
Tilt::Template
- Object
- Tilt::Template
- JqueryExpandAssets::JqueryExpandProcessor
- Defined in:
- lib/jquery_expand_assets/jquery_expand_processor.rb
Instance Method Summary collapse
- #evaluate(scope, locals, &block) ⇒ Object
-
#prepare ⇒ Object
implemented for the superclass’s template method.
Instance Method Details
#evaluate(scope, locals, &block) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/jquery_expand_assets/jquery_expand_processor.rb', line 8 def evaluate(scope, locals, &block) name = scope.logical_path.sub(/^templates\//, '').sub(%r{/?_(.*)$}, '/\1') " this.JST ||= {}\n template = null\n html = \"\"\"\n \#{data}\n \"\"\"\n this.JST[\#{name.inspect}] = (directive) ->\n template ||= $(html)\n template.expand(directive).children()\n COFFEE\nend\n" |
#prepare ⇒ Object
implemented for the superclass’s template method
6 |
# File 'lib/jquery_expand_assets/jquery_expand_processor.rb', line 6 def prepare; end |