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/compiler.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/compiler.rb', line 102

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/compiler.rb', line 91

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

Class Method Details

.make_scanner(src, trim_mode, percent)

[ GitHub ]

  
# File 'lib/erb/compiler.rb', line 95

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/compiler.rb', line 88

alias :regist_scanner :register_scanner

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

[ GitHub ]

  
# File 'lib/erb/compiler.rb', line 85

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

Instance Attribute Details

#etags (readonly)

[ GitHub ]

  
# File 'lib/erb/compiler.rb', line 109

attr_reader :stags, :etags

#stag (rw)

[ GitHub ]

  
# File 'lib/erb/compiler.rb', line 108

attr_accessor :stag

#stags (readonly)

[ GitHub ]

  
# File 'lib/erb/compiler.rb', line 109

attr_reader :stags, :etags

Instance Method Details

#scan

[ GitHub ]

  
# File 'lib/erb/compiler.rb', line 111

def scan; end