Class: Gammo::Tokenizer::ScriptScanner

Inherits:
Object
  • Object
show all
Includes:
Debug
Defined in:
lib/gammo/tokenizer/script_scanner.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Debug

#debug, included

Constructor Details

#initialize(scanner, raw_tag:, debug: false) ⇒ ScriptScanner

Returns a new instance of ScriptScanner.



12
13
14
15
16
17
# File 'lib/gammo/tokenizer/script_scanner.rb', line 12

def initialize(scanner, raw_tag:, debug: false)
  @scanner = scanner
  @buffer  = ''
  @raw_tag = raw_tag
  @debug   = debug
end

Instance Attribute Details

#bufferObject (readonly)

Returns the value of attribute buffer.



8
9
10
# File 'lib/gammo/tokenizer/script_scanner.rb', line 8

def buffer
  @buffer
end

#raw_tagObject (readonly)

Returns the value of attribute raw_tag.



8
9
10
# File 'lib/gammo/tokenizer/script_scanner.rb', line 8

def raw_tag
  @raw_tag
end

#scannerObject (readonly)

Returns the value of attribute scanner.



8
9
10
# File 'lib/gammo/tokenizer/script_scanner.rb', line 8

def scanner
  @scanner
end

Instance Method Details

#scanObject



19
20
21
22
# File 'lib/gammo/tokenizer/script_scanner.rb', line 19

def scan
  scan_script_data
  buffer
end