Class: Gammo::Tokenizer::ScriptScanner
- Inherits:
-
Object
- Object
- Gammo::Tokenizer::ScriptScanner
- Includes:
- Debug
- Defined in:
- lib/gammo/tokenizer/script_scanner.rb
Instance Attribute Summary collapse
-
#buffer ⇒ Object
readonly
Returns the value of attribute buffer.
-
#raw_tag ⇒ Object
readonly
Returns the value of attribute raw_tag.
-
#scanner ⇒ Object
readonly
Returns the value of attribute scanner.
Instance Method Summary collapse
-
#initialize(scanner, raw_tag:, debug: false) ⇒ ScriptScanner
constructor
A new instance of ScriptScanner.
- #scan ⇒ Object
Methods included from Debug
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
#buffer ⇒ Object (readonly)
Returns the value of attribute buffer.
8 9 10 |
# File 'lib/gammo/tokenizer/script_scanner.rb', line 8 def buffer @buffer end |
#raw_tag ⇒ Object (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 |
#scanner ⇒ Object (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
#scan ⇒ Object
19 20 21 22 |
# File 'lib/gammo/tokenizer/script_scanner.rb', line 19 def scan scan_script_data buffer end |