Class: Solargraph::Pin::YardPin::Namespace
- Includes:
- YardMixin
- Defined in:
- lib/solargraph/pin/yard_pin/namespace.rb
Instance Attribute Summary
Attributes included from YardMixin
#code_object, #location, #spec
Attributes inherited from Namespace
Attributes inherited from Closure
Attributes inherited from Base
#code_object, #location, #name, #path, #return_type
Attributes included from Common
Instance Method Summary collapse
-
#initialize(code_object, spec, closure = nil) ⇒ Namespace
constructor
A new instance of Namespace.
Methods inherited from Namespace
#binder, #completion_item_kind, #domains, #full_context, #gates, #namespace, #path, #return_type, #scope, #symbol_kind, #typify
Methods inherited from Closure
Methods inherited from Base
#==, #comments, #completion_item_kind, #deprecated?, #directives, #docstring, #filename, #identity, #infer, #inspect, #macros, #maybe_directives?, #nearly?, #probe, #probed?, #proxied?, #proxy, #realize, #symbol_kind, #to_s, #try_merge!, #typify, #variable?
Methods included from Documenting
Methods included from Conversions
#completion_item, #detail, #link_documentation, #reset_conversions, #resolve_completion_item, #signature_help, #text_documentation
Methods included from Common
#binder, #comments, #context, #name, #namespace, #path, #return_type
Constructor Details
#initialize(code_object, spec, closure = nil) ⇒ Namespace
Returns a new instance of Namespace.
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/solargraph/pin/yard_pin/namespace.rb', line 9 def initialize code_object, spec, closure = nil closure ||= Solargraph::Pin::Namespace.new( name: code_object.namespace.to_s, closure: Pin::ROOT_PIN, gates: [code_object.namespace.to_s] ) super( location: object_location(code_object, spec), name: code_object.name.to_s, comments: code_object.docstring ? code_object.docstring.all.to_s : '', type: code_object.is_a?(YARD::CodeObjects::ClassObject) ? :class : :module, visibility: code_object.visibility, closure: closure ) end |