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 372

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 361

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

Class Method Details

.make_scanner(src, trim_mode, percent)

[ GitHub ]

  
# 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)

Alias for .register_scanner.

[ GitHub ]

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

alias :regist_scanner :register_scanner

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

[ GitHub ]

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

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 379

attr_reader :stags, :etags

#stag (rw)

[ GitHub ]

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

attr_accessor :stag

#stags (readonly)

[ GitHub ]

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

attr_reader :stags, :etags

Instance Method Details

#scan

[ GitHub ]

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

def scan; end