class Sprockets::JstProcessor

def self.default_mime_type

def self.default_mime_type
  'application/javascript'
end

def self.default_namespace

def self.default_namespace
  'this.JST'
end

def evaluate(scope, locals, &block)

def evaluate(scope, locals, &block)
  <<-JST
ction() {
namespace} || (#{namespace} = {});
namespace}[#{scope.logical_path.inspect}] = #{indent(data)};
all(this);
  JST
end

def indent(string)

def indent(string)
  string.gsub(/$(.)/m, "\\1  ").strip
end

def prepare

def prepare
  @namespace = self.class.default_namespace
end