class WebConsole::Template - web-console-2.1.2 Documentation

# class WebConsole::Template

A facade that handles template rendering and composition.

It introduces template helpers to ease the inclusion of scripts only on Rails error pages.

### Public Class Methods

new(env, session) click to toggle source

    # File lib/web_console/template.rb, line 38
    def initialize(env, session)
      @env = env
      @session = session
    end

### Public Instance Methods

render(template) click to toggle source

Render a template (inferred from `template_paths`) as a plain string.

    # File lib/web_console/template.rb, line 44
    def render(template)
      context = Context.new(template_paths, instance_values)
      context.render(template: template, layout: false)
    end