Module | Erubis::Generator
In: | erubis/generator.rb

code generator, called by Converter module

### Methods

add_expr_debug add_expr_escaped add_expr_literal add_postamble add_preamble add_stmt add_text escape_text escaped_expr init_generator

### Attributes

escapefunc | [RW] |

### Public Instance methods

add_expr_debug(src, code)

(abstract) add expression code to src for debug. this is called by add_expr().

[Source]

    # File erubis/generator.rb, line 73
        def add_expr_debug(src, code)
          not_implemented
        end

add_expr_escaped(src, code)

(abstract) add escaped expression code to src. this is called by add_expr().

[Source]

    # File erubis/generator.rb, line 68
        def add_expr_escaped(src, code)
          not_implemented
        end

add_expr_literal(src, code)

(abstract) add expression literal code to src. this is called by add_expr().

[Source]

    # File erubis/generator.rb, line 63
        def add_expr_literal(src, code)
          not_implemented
        end

add_postamble(src)

(abstract) add @postamble to src

[Source]

    # File erubis/generator.rb, line 78
        def add_postamble(src)
          not_implemented
        end

add_preamble(src)

(abstract) add @preamble to src

[Source]

    # File erubis/generator.rb, line 48
        def add_preamble(src)
          not_implemented
        end

add_stmt(src, code)

(abstract) add statement code to src

[Source]

    # File erubis/generator.rb, line 58
        def add_stmt(src, code)
          not_implemented
        end

add_text(src, text)

(abstract) add text string to src

[Source]

    # File erubis/generator.rb, line 53
        def add_text(src, text)
          not_implemented
        end

escape_text(text)

(abstract) escape text string

ex.

      def escape_text(text)
        return text.dump
        # or return "'" + text.gsub(/['\\]/, '\\\\\&') + "'"
      end

[Source]

    # File erubis/generator.rb, line 37
        def escape_text(text)
          not_implemented
        end

escaped_expr(code)

return escaped expression code (ex. ‘h(…)’ or ‘htmlspecialchars(…)’)

[Source]

    # File erubis/generator.rb, line 42
        def escaped_expr(code)
          code.strip!
          return "#{@escapefunc}(#{code})"
        end

init_generator(properties={})

[Source]

    # File erubis/generator.rb, line 25
        def init_generator(properties={})
          @escapefunc = properties[:escapefunc]
        end

[Validate]