Class: ERB::Compiler::SimpleScanner

Inherits:
Scanner show all
Defined in:
lib/framework/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



420
421
422
423
424
425
426
427
# File 'lib/framework/erb.rb', line 420

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