Class: RubyLsp::ERBDocument::ERBScanner
- Inherits:
-
Object
- Object
- RubyLsp::ERBDocument::ERBScanner
- Defined in:
- lib/ruby_lsp/erb_document.rb
Instance Attribute Summary collapse
-
#host_language ⇒ Object
readonly
: String.
-
#ruby ⇒ Object
readonly
: String.
Instance Method Summary collapse
-
#initialize(source) ⇒ ERBScanner
constructor
: (String source) -> void.
-
#scan ⇒ Object
: -> void.
Constructor Details
#initialize(source) ⇒ ERBScanner
: (String source) -> void
79 80 81 82 83 84 85 |
# File 'lib/ruby_lsp/erb_document.rb', line 79 def initialize(source) @source = source @host_language = +"" #: String @ruby = +"" #: String @current_pos = 0 #: Integer @inside_ruby = false #: bool end |
Instance Attribute Details
#host_language ⇒ Object (readonly)
: String
76 77 78 |
# File 'lib/ruby_lsp/erb_document.rb', line 76 def host_language @host_language end |
#ruby ⇒ Object (readonly)
: String
76 77 78 |
# File 'lib/ruby_lsp/erb_document.rb', line 76 def ruby @ruby end |
Instance Method Details
#scan ⇒ Object
: -> void
88 89 90 91 92 93 |
# File 'lib/ruby_lsp/erb_document.rb', line 88 def scan while @current_pos < @source.length scan_char @current_pos += 1 end end |