Module: Erubis::PrintOutEnhancer

Module | Erubis::PrintOutEnhancer
In: | erubis/enhancer.rb

use print statement instead of ‘_buf << …’

this is only for Eruby.

### Methods

add_expr_escaped add_expr_literal add_postamble add_preamble add_text

### Public Instance methods

add_expr_escaped(src, code)

[Source]

    # File erubis/enhancer.rb, line 102
        def add_expr_escaped(src, code)
          src << " print #{escaped_expr(code)};"
        end

add_expr_literal(src, code)

[Source]

    # File erubis/enhancer.rb, line 98
        def add_expr_literal(src, code)
          src << " print((#{code}).to_s);"
        end

add_postamble(src)

[Source]

    # File erubis/enhancer.rb, line 106
        def add_postamble(src)
          src << "\n" unless src[-1] == ?\n
        end

add_preamble(src)

[Source]

    # File erubis/enhancer.rb, line 91
        def add_preamble(src)
        end

add_text(src, text)

[Source]

    # File erubis/enhancer.rb, line 94
        def add_text(src, text)
          src << " print '#{escape_text(text)}';" unless text.empty?
        end

[Validate]