Class: Solargraph::Pin::YardPin::Namespace

Inherits:
Namespace show all
Includes:
YardMixin
Defined in:
lib/solargraph/pin/yard_pin/namespace.rb

Instance Attribute Summary

Attributes inherited from Namespace

#type, #visibility

Attributes inherited from Closure

#scope

Attributes inherited from Base

#code_object, #kind, #location, #name, #path, #return_type

Attributes included from Common

#closure, #location

Instance Method Summary collapse

Methods inherited from Namespace

#binder, #completion_item_kind, #domains, #full_context, #kind, #namespace, #path, #return_type, #scope, #symbol_kind, #typify

Methods inherited from Closure

#binder, #context

Methods inherited from Base

#==, #comments, #completion_item_kind, #deprecated?, #directives, #docstring, #filename, #infer, #inspect, #macros, #maybe_directives?, #nearly?, #probe, #probed?, #proxied?, #proxy, #realize, #symbol_kind, #to_s, #try_merge!, #typify, #variable?

Methods included from Documenting

#documentation

Methods included from Conversions

#completion_item, #detail, #link_documentation, #reset_conversions, #resolve_completion_item, #signature_help

Methods included from Common

#binder, #comments, #context, #kind, #name, #namespace, #path, #return_type

Constructor Details

#initialize(code_object, location) ⇒ Namespace


7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/solargraph/pin/yard_pin/namespace.rb', line 7

def initialize code_object, location
  @code_object = code_object
  closure = Solargraph::Pin::Namespace.new(
    name: code_object.namespace.to_s,
    closure: Pin::ROOT_PIN
  )
  super(
    location: location,
    name: code_object.name.to_s,
    comments: comments_from(code_object),
    type: namespace_type(code_object),
    visibility: code_object.visibility,
    closure: closure
  )
end