class RubyLanguageServer::ScopeData::Variable
Public Class Methods
build(scope, name, line = 1, column = 1, type = TYPE_VARIABLE)
click to toggle source
# File lib/ruby_language_server/scope_data/variable.rb, line 15 def self.build(scope, name, line = 1, column = 1, type = TYPE_VARIABLE) path = [scope.full_name, name].join(JoinHash[TYPE_VARIABLE]) create!( line: line, column: column, name: name, path: path, variable_type: type ) end
Public Instance Methods
constant?()
click to toggle source
# File lib/ruby_language_server/scope_data/variable.rb, line 26 def constant? !name&.match(/^[A-Z]/).nil? end
top_line()
click to toggle source
Convenience for tags
# File lib/ruby_language_server/scope_data/variable.rb, line 31 def top_line line end