Module: Hanami::View::ERB Private

Defined in:
lib/hanami/view/erb/template.rb,
lib/hanami/view/erb/engine.rb,
lib/hanami/view/erb/parser.rb,
lib/hanami/view/erb/filters/block.rb,
lib/hanami/view/erb/filters/trimming.rb

Overview

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Hanami::View ERB template renderer for Tilt.

The key features of this ERB implementation are:

  • Auto-escaping any non-‘html_safe?` values given to `<%=` ERB expression tags, with auto-escaping disabled when using `<%==` tags.

  • Implicitly capturing and correctly outputting block content without the need for special helpers. This allows helpers like ‘<%= form_for(:post) do %>` to be used, with the `form_for` helper itself doing nothing more special than a `yield`.

See [Tilt](github.com/rtomayko/tilt) for rendering options.

Examples:

Hanami::View::ERB::Template.new { "<%= 'Hello, world!' %>" }.render

Since:

  • 2.1.0

Defined Under Namespace

Modules: Filters Classes: Engine, Parser

Constant Summary collapse

Template =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

ERB Template class

Since:

  • 2.1.0

Temple::Templates::Tilt(Engine)