Class: Solargraph::Pin::Reference::Override

Inherits:
Solargraph::Pin::Reference show all
Defined in:
lib/solargraph/pin/reference/override.rb

Instance Attribute Summary collapse

Attributes inherited from Base

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

Attributes included from Common

#closure, #location

Class Method Summary collapse

Instance Method Summary collapse

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

#documentation

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(location, name, tags, delete = []) ⇒ Override

Returns a new instance of Override.



13
14
15
16
17
# File 'lib/solargraph/pin/reference/override.rb', line 13

def initialize location, name, tags, delete = []
  super(location: location, name: name)
  @tags = tags
  @delete = delete
end

Instance Attribute Details

#deleteArray<Symbol> (readonly)

Returns:



11
12
13
# File 'lib/solargraph/pin/reference/override.rb', line 11

def delete
  @delete
end

#tagsArray<YARD::Tags::Tag> (readonly)

Returns:

  • (Array<YARD::Tags::Tag>)


8
9
10
# File 'lib/solargraph/pin/reference/override.rb', line 8

def tags
  @tags
end

Class Method Details

.from_comment(name, comment) ⇒ Object



23
24
25
# File 'lib/solargraph/pin/reference/override.rb', line 23

def self.from_comment name, comment
  new(nil, name, Solargraph::Source.parse_docstring(comment).to_docstring.tags)
end

.method_return(name, *tags, delete: []) ⇒ Object



19
20
21
# File 'lib/solargraph/pin/reference/override.rb', line 19

def self.method_return name, *tags, delete: []
  new(nil, name, [YARD::Tags::Tag.new('return', nil, tags)], delete)
end