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

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

Constant Summary

Constants included from Logging

Logging::DEFAULT_LOG_LEVEL, Logging::LOG_LEVELS

Instance Attribute Summary collapse

Attributes inherited from Solargraph::Pin::Reference

#generic_values

Attributes inherited from Base

#code_object, #directives, #docstring, #location, #name, #path, #return_type, #source, #type_location

Attributes included from Common

#context, #location

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#==, #all_location_text, #all_rooted?, #assert_same, #assert_same_array_content, #assert_same_count, #assert_same_macros, #assert_source_provided, #best_location, #choose, #choose_longer, #choose_node, #choose_pin_attr, #choose_pin_attr_with_same_name, #combine_directives, #combine_name, #combine_return_type, #combine_with, #comments, #completion_item_kind, #deprecated?, #desc, #dodgy_return_type_source?, #erase_generics, #filename, #identity, #infer, #inner_desc, #inspect, #macros, #maybe_directives?, #nearly?, #needs_consistent_name?, #prefer_rbs_location, #presence_certain?, #probe, #probed?, #proxied?, #proxy, #rbs_location?, #realize, #reset_generated!, #resolve_generics, #resolve_generics_from_context, #symbol_kind, #to_rbs, #to_s, #transform_types, #type_desc, #typify, #variable?

Methods included from Logging

logger

Methods included from Documenting

#documentation, normalize_indentation, strip_html_comments

Methods included from Conversions

#completion_item, #completion_item_kind, #deprecated?, #detail, #link_documentation, #probed?, #proxied?, #reset_conversions, #resolve_completion_item, #signature_help, #text_documentation

Methods included from Common

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

Constructor Details

#initialize(location, name, tags, delete = [], **splat) ⇒ Override

Returns a new instance of Override.



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

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

Instance Attribute Details

#delete::Array<Symbol> (readonly)

Returns:



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

def delete
  @delete
end

#tags::Array<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, **splat) ⇒ Object



27
28
29
# File 'lib/solargraph/pin/reference/override.rb', line 27

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

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



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

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

Instance Method Details

#closureObject



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

def closure
  nil
end