Class: RubyLsp::ERBDocument::ERBScanner

Inherits:
Object
  • Object
show all
Defined in:
lib/ruby_lsp/erb_document.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_languageObject (readonly)

: String



76
77
78
# File 'lib/ruby_lsp/erb_document.rb', line 76

def host_language
  @host_language
end

#rubyObject (readonly)

: String



76
77
78
# File 'lib/ruby_lsp/erb_document.rb', line 76

def ruby
  @ruby
end

Instance Method Details

#scanObject

: -> 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