Class: Kapusta::LSP::ScopeWalker::Scope

Inherits:
Struct
  • Object
show all
Defined in:
lib/kapusta/lsp/scope_walker.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#bindingsObject

Returns the value of attribute bindings

Returns:

  • (Object)

    the current value of bindings



13
14
15
# File 'lib/kapusta/lsp/scope_walker.rb', line 13

def bindings
  @bindings
end

#idObject

Returns the value of attribute id

Returns:

  • (Object)

    the current value of id



13
14
15
# File 'lib/kapusta/lsp/scope_walker.rb', line 13

def id
  @id
end

#kindObject

Returns the value of attribute kind

Returns:

  • (Object)

    the current value of kind



13
14
15
# File 'lib/kapusta/lsp/scope_walker.rb', line 13

def kind
  @kind
end

#parentObject

Returns the value of attribute parent

Returns:

  • (Object)

    the current value of parent



13
14
15
# File 'lib/kapusta/lsp/scope_walker.rb', line 13

def parent
  @parent
end

Instance Method Details

#lookup(name) ⇒ Object



14
15
16
# File 'lib/kapusta/lsp/scope_walker.rb', line 14

def lookup(name)
  bindings[name] || parent&.lookup(name)
end