Module Erubis::PercentLineEnhancer
In: erubis/enhancer.rb

regards lines starting with ’%’ as program code

this is for compatibility to eruby and ERB.

this is language-independent.

Methods

add_text  

Constants

PERCENT_LINE_PATTERN = /(.*?)^\%(.*?\r?\n)/m

Public Instance methods

[Source]

# File erubis/enhancer.rb, line 390
    def add_text(src, text)
      text.scan(PERCENT_LINE_PATTERN) do |txt, line|
        super(src, txt)
        if line[0] == ?%
          super(src, line)
        else
          add_stmt(src, line)
        end
      end
      rest = $' || text
      super(src, rest)
    end

[Validate]