Parent

Sprockets::JstProcessor

Attributes

namespace[R]

Public Class Methods

default_mime_type() click to toggle source
# File lib/sprockets/jst_processor.rb, line 5
def self.default_mime_type
  'application/javascript'
end
default_namespace() click to toggle source
# File lib/sprockets/jst_processor.rb, line 9
def self.default_namespace
  'this.JST'
end

Public Instance Methods

evaluate(scope, locals, &block) click to toggle source
# File lib/sprockets/jst_processor.rb, line 19
def evaluate(scope, locals, &block)
  (function() {  #{namespace} || (#{namespace} = {});  #{namespace}[#{scope.logical_path.inspect}] = #{indent(data)};}).call(this);
end
prepare() click to toggle source
# File lib/sprockets/jst_processor.rb, line 13
def prepare
  @namespace = self.class.default_namespace
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.