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


370
371
372
373
# File 'lib/erb.rb', line 370

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

Instance Attribute Details

#stagObject

Returns the value of attribute stag


374
375
376
# File 'lib/erb.rb', line 374

def stag
  @stag
end

Class Method Details

.default_scanner=(klass) ⇒ Object


361
362
363
# File 'lib/erb.rb', line 361

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

.make_scanner(src, trim_mode, percent) ⇒ Object


365
366
367
368
# File 'lib/erb.rb', line 365

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


357
358
359
# File 'lib/erb.rb', line 357

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

Instance Method Details

#scanObject


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

def scan; end