Class Index [+]

Quicksearch

Erubis::Generator

code generator, called by Converter module

Attributes

escapefunc[RW]

Public Instance Methods

add_expr_debug(src, code) click to toggle source

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

    # File lib/erubis/generator.rb, line 72
72:     def add_expr_debug(src, code)
73:       not_implemented
74:     end
add_expr_escaped(src, code) click to toggle source

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

    # File lib/erubis/generator.rb, line 67
67:     def add_expr_escaped(src, code)
68:       not_implemented
69:     end
add_expr_literal(src, code) click to toggle source

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

    # File lib/erubis/generator.rb, line 62
62:     def add_expr_literal(src, code)
63:       not_implemented
64:     end
add_postamble(src) click to toggle source

(abstract) add @postamble to src

    # File lib/erubis/generator.rb, line 77
77:     def add_postamble(src)
78:       not_implemented
79:     end
add_preamble(src) click to toggle source

(abstract) add @preamble to src

    # File lib/erubis/generator.rb, line 47
47:     def add_preamble(src)
48:       not_implemented
49:     end
add_stmt(src, code) click to toggle source

(abstract) add statement code to src

    # File lib/erubis/generator.rb, line 57
57:     def add_stmt(src, code)
58:       not_implemented
59:     end
add_text(src, text) click to toggle source

(abstract) add text string to src

    # File lib/erubis/generator.rb, line 52
52:     def add_text(src, text)
53:       not_implemented
54:     end
escape_text(text) click to toggle source

(abstract) escape text string

ex.

  def escape_text(text)
    return text.dump
    # or return "'" + text.gsub(/['\\]/, '\\\\\&') + "'"
  end
    # File lib/erubis/generator.rb, line 36
36:     def escape_text(text)
37:       not_implemented
38:     end
escaped_expr(code) click to toggle source

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

    # File lib/erubis/generator.rb, line 41
41:     def escaped_expr(code)
42:       code.strip!
43:       return "#{@escapefunc}(#{code})"
44:     end
init_generator(properties={}) click to toggle source
    # File lib/erubis/generator.rb, line 24
24:     def init_generator(properties={})
25:       @escapefunc = properties[:escapefunc]
26:     end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.