Class: RubyLsp::Ree::ParsedImportLinkNode

Inherits:
ParsedLinkNode show all
Defined in:
lib/ruby_lsp/ruby_lsp_ree/parsing/parsed_import_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?, #imports, #initialize, #location, #multi_object_link?, #name_arg_node, #object_name_type?, #parse_imports, #usage_name

Constructor Details

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

Instance Method Details

#import_block_close_locationObject



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

def import_block_close_location
  import_arg.closing_loc
end

#import_block_open_locationObject



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

def import_block_open_location
  import_arg.opening_loc
end

Returns:

  • (Boolean)


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

def import_link_type?
  true
end


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

def link_package_name
  from_arg_value || document_package
end


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

def link_type
  :import_link
end