simple helper method to quickly render a template
@param model
@param view
@return
@throws IOException
770736
public String render(SoyMapData model, String view) throws IOException {
		return getSoyTofu(null).newRenderer(view).setData(model).render();
	}
427705
public String render(String template) {
    ENGINE_LOG.debug(template);
    return render(parse(template), true);
  }
617576
def render(template, context = {})
      return nil unless exist?(template)

      path = File.join(@template_path, template + ".erb")
      layout_context = context.merge(partial: ERB.new(File.read(path)).result(Yokunai::RenderContext.new(context).get_binding))

      ERB.new(@raw_layout).result(Yokunai::RenderContext.new(layout_context).get_binding)
    end
628932
public static String render(Template template, Map<String, Object> bindingMap) {
		template.binding(bindingMap);
		return template.render();
	}
902410
function(el) {
            var that = this;
            var d = Q.defer();

            if (this.view != null) el = el || this.view.$el;
            this.on("loaded", function() {
                if (this.content == null) return;
                if (this.view != null) this.view.clearComponents();
                this.generate(this.args).then(function(content) {
                    el.html(content);
                    if (that.view != null) that.view.renderComponents();
                    that.trigger("updated");
                    d.resolve(el);
                }, function(err) {
                    logging.exception(err, "Error with template:");
                    d.reject(err);
                });
                
            }, this);
            this.load();

            return d.promise;
        }
967250
public void render(Template template, Writer out, GlobalScope... extraGlobalScopes) throws IOException {
    newInterpreter(extraGlobalScopes).process((TemplateImpl) template, out);
  }
753263
def render_view(parser, token):
    
    bits = token.split_contents()

    n = len(bits)
    if n < 2:
        raise TemplateSyntaxError("'%s' takes at least one view as argument")

    viewname = bits[1]

    kwargs = {}
    if n > 2:
        for bit in bits[2:]:
            match = kwarg_re.match(bit)
            if not match:
                raise TemplateSyntaxError("Malformed arguments to render_view tag")
            name, value = match.groups()
            if name:
                kwargs[name] = parser.compile_filter(value)

    return StringNode(viewname, kwargs)
406505
public function render($view, array $data = null)
	{
		$engine = new Engine($this->templatePath);
		$template = new Template($engine);
		return $template->render($view, $data);
	}
641550
public String render(Object object) {
        ModelAndView modelAndView = (ModelAndView) object;
        return render(modelAndView);
    }
1031713
def render_template(view, template, layout_name = nil, locals = {}) #:nodoc:
      return [super.body] unless layout_name && template.supports_streaming?

      locals ||= {}
      layout   = layout_name && find_layout(layout_name, locals.keys, [formats.first])

      Body.new do |buffer|
        delayed_render(buffer, template, layout, view, locals)
      end
    end
240750
function(newModel) {
      var t = this;
      if (newModel) {
        t.model = newModel;
      }
      t.json = t.isBackbone ? t.model.toJSON() : t.model;

      // If a non-object, just print it
      if (typeof t.json !== 'object') {
        t.$el.html('');
        $(t.template.line({name:'value', value:t.json})).appendTo(t.$el);
        return;
      }

      // Re-render if the object elements differ
      var newKeys = _.keys(t.json);
      if (newKeys.length !== t.keys.length || newKeys.length !== _.intersection(t.keys, newKeys).length) {
        return t.render();
      }
      t.keys = newKeys;

      // Set each element
      for (var elemName in t.json) {
        var elem = t.elems[elemName];
        elem.value = t.getElemValue(elemName);
        t.setElemValue(elem);
      }
      return t;
    }
1300015
private String renderTemplate(Run<?, ?> build, FilePath workspace, TaskListener listener, InputStream templateStream)
            throws IOException {
        
        String result;
        
        final Map<String, Object> binding = new HashMap<>();
        ExtendedEmailPublisherDescriptor descriptor = Jenkins.getActiveInstance().getDescriptorByType(ExtendedEmailPublisherDescriptor.class);
        binding.put("build", build);
        binding.put("listener", listener);
        binding.put("it", new ScriptContentBuildWrapper(build));
        binding.put("rooturl", descriptor.getHudsonUrl());
        binding.put("project", build.getParent());
        binding.put("workspace", workspace);

        try {
            String text = IOUtils.toString(templateStream);
            boolean approvedScript = false;
            if (templateStream instanceof UserProvidedContentInputStream && !AbstractEvalContent.isApprovedScript(text, GroovyLanguage.get())) {
                approvedScript = false;
                ScriptApproval.get().configuring(text, GroovyLanguage.get(), ApprovalContext.create().withItem(build.getParent()));
            } else {
                approvedScript = true;
            }
            // we add the binding to the SimpleTemplateEngine instead of the shell
            GroovyShell shell = createEngine(descriptor, Collections.<String, Object>emptyMap(), !approvedScript);
            SimpleTemplateEngine engine = new SimpleTemplateEngine(shell);
            Template tmpl;
            synchronized (templateCache) {
                Reference<Template> templateR = templateCache.get(text);
                tmpl = templateR == null ? null : templateR.get();
                if (tmpl == null) {
                    tmpl = engine.createTemplate(text);
                    templateCache.put(text, new SoftReference<>(tmpl));
                }
            }
            final Template tmplR = tmpl;
            if (approvedScript) {
                //The script has been approved by an admin, so run it as is
                result = tmplR.make(binding).toString();
            } else {
                //unapproved script, so run in sandbox
                StaticProxyInstanceWhitelist whitelist = new StaticProxyInstanceWhitelist(build, "templates-instances.whitelist");
                result = GroovySandbox.runInSandbox(new Callable<String>() {
                    @Override
                    public String call() throws Exception {
                        return tmplR.make(binding).toString(); //TODO there is a PrintWriter instance created in make and bound to out
                    }
                }, new ProxyWhitelist(
                        Whitelist.all(),
                        new TaskListenerInstanceWhitelist(listener),
                        new PrintStreamInstanceWhitelist(listener.getLogger()),
                        new EmailExtScriptTokenMacroWhitelist(),
                        whitelist));
            }

        } catch(Exception e) {
            StringWriter sw = new StringWriter();
            PrintWriter pw = new PrintWriter(sw);
            e.printStackTrace(pw);
            result = "Exception raised during template rendering: " + e.getMessage() + "\n\n" + sw.toString();
        }
        return result;
    }
1289225
public static void writeModel(@NonNull Model model, @NonNull OutputStream stream, boolean saveUpdater)
            throws IOException {
        writeModel(model,stream,saveUpdater,null);
    }
815255
def render(filename, context=binding)
      contents=File.read(expand_filename(filename))
      template(contents, context)
    end
79797
public static <T> TextField<T> newTextField(final String id, final IModel<T> model)
	{
		final TextField<T> textField = new TextField<>(id, model);
		textField.setOutputMarkupId(true);
		return textField;
	}
223423
public void generateFromStringTemplate(TypeDef model, String[] parameters, String content) throws IOException {
        TypeDef newModel = createTypeFromTemplate(model, parameters, content);
        if (processingEnv.getElementUtils().getTypeElement(newModel.getFullyQualifiedName()) != null) {
            System.err.println("Skipping: " + newModel.getFullyQualifiedName()+ ". Class already exists.");
            return;
        }
        if (classExists(newModel)) {
            System.err.println("Skipping: " + newModel.getFullyQualifiedName()+ ". Class already exists.");
            return;
        }
        generateFromStringTemplate(model, parameters, processingEnv.getFiler().createSourceFile(newModel.getFullyQualifiedName()), content);
    }
798016
protected void putIntoModel(final Map<String, Object> model, final String key, final Object value) {
        LOGGER.trace("Adding attribute [{}] into the view model for [{}] with value [{}]", key, getClass().getSimpleName(), value);
        model.put(key, value);
    }