class Linner::Wrapper::Template

Public Class Methods

definition(content) click to toggle source
# File lib/linner/wrapper.rb, line 29
      def self.definition(content)
<<-DEFINITION
(function() {
  var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};
  #{content}
})();
DEFINITION
      end
partial_wrap(name, content) click to toggle source
# File lib/linner/wrapper.rb, line 22
      def self.partial_wrap(name, content)
<<-PARTIAL
Handlebars.registerPartial("#{name}", Handlebars.template(#{content}));
PARTIAL
      end
wrap(name, content) click to toggle source
# File lib/linner/wrapper.rb, line 16
      def self.wrap(name, content)
<<-WRAPPER
templates["#{name}"] = template(#{content});
WRAPPER
      end