Class: ERB::Compiler::Scanner

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



297
298
299
300
# File 'lib/framework/erb.rb', line 297

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

Instance Attribute Details

#stagObject

Returns the value of attribute stag.



301
302
303
# File 'lib/framework/erb.rb', line 301

def stag
  @stag
end

Class Method Details

.default_scanner=(klass) ⇒ Object



288
289
290
# File 'lib/framework/erb.rb', line 288

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

.make_scanner(src, trim_mode, percent) ⇒ Object



292
293
294
295
# File 'lib/framework/erb.rb', line 292

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



284
285
286
# File 'lib/framework/erb.rb', line 284

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

Instance Method Details

#scanObject



303
# File 'lib/framework/erb.rb', line 303

def scan; end