Class: Kwartz::ErubisTranslator

Inherits:
BaseTranslator show all
Includes:
RubyExpressionParser
Defined in:
lib/kwartz/binding/erubis.rb

Overview

translator for Erubis

Constant Summary collapse

ERUBIS_EMBED_PATTERNS =
[
  '<% ',    ' %>',        # statement
  '<%= ',   ' %>',        # expression
  '<%== ',  ' %>',        # escaped expression
]

Instance Attribute Summary

Attributes inherited from BaseTranslator

#escape, #footer, #header

Instance Method Summary collapse

Methods included from RubyExpressionParser

#parse_expr_str, #parse_expr_str!

Methods inherited from BaseTranslator

#translate, #translate_native_expr, #translate_native_stmt, #translate_print_stmt, #translate_string

Methods inherited from Translator

get_class, register_class, #translate, #translate_native_expr, #translate_native_stmt, #translate_print_stmt, #translate_string

Constructor Details

#initialize(properties = {}) ⇒ ErubisTranslator

Returns a new instance of ErubisTranslator.



37
38
39
40
# File 'lib/kwartz/binding/erubis.rb', line 37

def initialize(properties={})
  super(ERUBIS_EMBED_PATTERNS, properties)
  #@escape = true if @escape == nil
end