Class: ERB::Compiler::Scanner
- Inherits:
-
Object
- Object
- ERB::Compiler::Scanner
show all
- Defined in:
- lib/erb.rb
Overview
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.
371
372
373
374
|
# File 'lib/erb.rb', line 371
def initialize(src, trim_mode, percent)
@src = src
@stag = nil
end
|
Instance Attribute Details
#stag ⇒ Object
Returns the value of attribute stag
375
376
377
|
# File 'lib/erb.rb', line 375
def stag
@stag
end
|
Class Method Details
.default_scanner=(klass) ⇒ Object
362
363
364
|
# File 'lib/erb.rb', line 362
def self.default_scanner=(klass)
@default_scanner = klass
end
|
.make_scanner(src, trim_mode, percent) ⇒ Object
366
367
368
369
|
# File 'lib/erb.rb', line 366
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
358
359
360
|
# File 'lib/erb.rb', line 358
def self.regist_scanner(klass, trim_mode, percent)
@scanner_map[[trim_mode, percent]] = klass
end
|
Instance Method Details
#scan ⇒ Object
377
|
# File 'lib/erb.rb', line 377
def scan; end
|