Class: CustomERB::Compiler::Scanner

Inherits:
Object
  • Object
show all
Defined in:
lib/ontomde-core/customERB.rb

Overview

:nodoc:

Direct Known Subclasses

SimpleScanner, TrimScanner

Constant Summary collapse

SplitRegexp =
/(<@@)|(@@>)|(<@=)|(<@#)|(<@)|(@>)|(\n)/

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.



291
292
293
294
# File 'lib/ontomde-core/customERB.rb', line 291

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

Instance Attribute Details

#stagObject

Returns the value of attribute stag.



295
296
297
# File 'lib/ontomde-core/customERB.rb', line 295

def stag
  @stag
end

Class Method Details

.default_scanner=(klass) ⇒ Object



282
283
284
# File 'lib/ontomde-core/customERB.rb', line 282

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

.make_scanner(src, trim_mode, percent) ⇒ Object



286
287
288
289
# File 'lib/ontomde-core/customERB.rb', line 286

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



278
279
280
# File 'lib/ontomde-core/customERB.rb', line 278

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

Instance Method Details

#scanObject



297
# File 'lib/ontomde-core/customERB.rb', line 297

def scan; end