Class: ERB::Compiler::SimpleScanner

Inherits:
Scanner
  • Object
show all
Defined in:
lib/erb.rb

Overview

:nodoc:

Instance Attribute Summary

Attributes inherited from Scanner

#stag

Instance Method Summary collapse

Methods inherited from Scanner

default_scanner=, #initialize, make_scanner, regist_scanner

Constructor Details

This class inherits a constructor from ERB::Compiler::Scanner

Instance Method Details

#scanObject



401
402
403
404
405
406
407
408
# File 'lib/erb.rb', line 401

def scan
  @src.scan(/(.*?)(<%%|%%>|<%=|<%#|<%|%>|\n|\z)/m) do |tokens|
    tokens.each do |token|
      next if token.empty?
      yield(token)
    end
	end
end