123456789_123456789_123456789_123456789_123456789_

Class: ERB::Compiler::Scanner

Do not use. This class is for internal use only.
Relationships & Source Files
Extension / Inclusion / Inheritance Descendants
Subclasses:
Inherits: Object
Defined in: lib/erb.rb

Constant Summary

Class Attribute Summary

Class Method Summary

Instance Attribute Summary

Instance Method Summary

Constructor Details

.new(src, trim_mode, percent) ⇒ Scanner

[ GitHub ]

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

def initialize(src, trim_mode, percent)
  @src = src
  @stag = nil
  @stags = DEFAULT_STAGS
  @etags = DEFAULT_ETAGS
end

Class Attribute Details

.default_scanner=(klass) (writeonly)

[ GitHub ]

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

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

Class Method Details

.make_scanner(src, trim_mode, percent)

[ GitHub ]

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

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)

Alias for .register_scanner.

[ GitHub ]

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

alias :regist_scanner :register_scanner

.register_scanner(klass, trim_mode, percent) Also known as: .regist_scanner

[ GitHub ]

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

def register_scanner(klass, trim_mode, percent)
  @scanner_map[[trim_mode, percent]] = klass
end

Instance Attribute Details

#etags (readonly)

[ GitHub ]

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

attr_reader :stags, :etags

#stag (rw)

[ GitHub ]

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

attr_accessor :stag

#stags (readonly)

[ GitHub ]

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

attr_reader :stags, :etags

Instance Method Details

#scan

[ GitHub ]

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

def scan; end