Class: ERB::Compiler::Scanner

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

Overview

:nodoc:

Direct Known Subclasses

SimpleScanner, TrimScanner

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(src, trim_mode, percent) ⇒ Scanner

Returns a new instance of Scanner.



278
279
280
281
# File 'lib/erb.rb', line 278

def initialize(src, trim_mode, percent)
	@src = src
	@stag = nil
end

Instance Attribute Details

#stagObject

Returns the value of attribute stag



282
283
284
# File 'lib/erb.rb', line 282

def stag
  @stag
end

Class Method Details

.default_scanner=(klass) ⇒ Object



269
270
271
# File 'lib/erb.rb', line 269

def self.default_scanner=(klass)
	@default_scanner = klass
end

.make_scanner(src, trim_mode, percent) ⇒ Object



273
274
275
276
# File 'lib/erb.rb', line 273

def self.make_scanner(src, trim_mode, percent)
	klass = @scanner_map.fetch([trim_mode, percent], @default_scanner)
	klass.new(src, trim_mode, percent)
end

.regist_scanner(klass, trim_mode, percent) ⇒ Object



265
266
267
# File 'lib/erb.rb', line 265

def self.regist_scanner(klass, trim_mode, percent)
	@scanner_map[[trim_mode, percent]] = klass
end

Instance Method Details

#scanObject



284
# File 'lib/erb.rb', line 284

def scan; end