Class: JqueryExpandAssets::JqueryExpandProcessor

Inherits:
Tilt::Template
  • Object
show all
Defined in:
lib/jquery_expand_assets/jquery_expand_processor.rb

Instance Method Summary collapse

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"

#prepareObject

implemented for the superclass’s template method



6
# File 'lib/jquery_expand_assets/jquery_expand_processor.rb', line 6

def prepare; end