method

inline_scan

ruby latest stable - Class: ERB::Compiler::PercentScanner

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v1_8_7_72) is shown here.

inline_scan(line)
public

No documentation available.

# File lib/erb.rb, line 450
        def inline_scan(line)
          stag_reg = /(.*?)(<%%|<%=|<%#|<%|\z)/m
          etag_reg = /(.*?)(%%>|%>|\z)/m
          scanner = StringScanner.new(line)
          while ! scanner.eos?
            scanner.scan(@stag ? etag_reg : stag_reg)
            yield(scanner[1])
            yield(scanner[2])
          end
        end