Class: Kwartz::EperlTranslator

Inherits:
BaseTranslator show all
Includes:
EperlExpressionParser
Defined in:
lib/kwartz/binding/eperl.rb

Overview

translator for ePerl

Constant Summary collapse

EPERL_EMBED_PATTERNS =
[
  '<? ',  ' !>',                 # statement
  '<?= ', ' !>',                 # expression
  '<?= encode_entities(', ') !>' # escaped expression
]

Instance Attribute Summary

Attributes inherited from BaseTranslator

#escape, #footer, #header

Instance Method Summary collapse

Methods included from EperlExpressionParser

#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 = {}) ⇒ EperlTranslator

Returns a new instance of EperlTranslator.



220
221
222
# File 'lib/kwartz/binding/eperl.rb', line 220

def initialize(properties={})
  super(EPERL_EMBED_PATTERNS, properties)
end