Class: RubyLsp::Ree::ParsedObjectLinkNode

Inherits:
ParsedLinkNode show all
Defined in:
lib/ruby_lsp/ruby_lsp_ree/parsing/parsed_object_link_node.rb

Constant Summary

Constants inherited from ParsedLinkNode

RubyLsp::Ree::ParsedLinkNode::AS_ARG_KEY, RubyLsp::Ree::ParsedLinkNode::FROM_ARG_KEY, RubyLsp::Ree::ParsedLinkNode::IMPORT_ARG_KEY

Instance Attribute Summary

Attributes inherited from ParsedLinkNode

#document_package, #from_param, #import_items, #kw_args, #linked_objects, #name, #node

Instance Method Summary collapse

Methods inherited from ParsedLinkNode

#file_path_type?, #first_arg_location, #from_arg_value, #has_import_section?, #has_kwargs?, #has_linked_object?, #import_link_type?, #imports, #initialize, #location, #name_arg_node, #parse_imports, #usage_name

Constructor Details

This class inherits a constructor from RubyLsp::Ree::ParsedLinkNode

Instance Method Details

#import_block_close_locationObject



24
25
26
# File 'lib/ruby_lsp/ruby_lsp_ree/parsing/parsed_object_link_node.rb', line 24

def import_block_close_location
  import_arg.value.closing_loc
end

#import_block_open_locationObject



20
21
22
# File 'lib/ruby_lsp/ruby_lsp_ree/parsing/parsed_object_link_node.rb', line 20

def import_block_open_location
  import_arg.value.opening_loc
end


8
9
10
# File 'lib/ruby_lsp/ruby_lsp_ree/parsing/parsed_object_link_node.rb', line 8

def link_package_name
  from_arg_value || document_package
end


12
13
14
# File 'lib/ruby_lsp/ruby_lsp_ree/parsing/parsed_object_link_node.rb', line 12

def link_type
  :object_name
end

#multi_object_link?Boolean

Returns:

  • (Boolean)


4
5
6
# File 'lib/ruby_lsp/ruby_lsp_ree/parsing/parsed_object_link_node.rb', line 4

def multi_object_link?
  @linked_objects.size > 1
end

#object_name_type?Boolean

Returns:

  • (Boolean)


16
17
18
# File 'lib/ruby_lsp/ruby_lsp_ree/parsing/parsed_object_link_node.rb', line 16

def object_name_type?
  true
end