Class: RubyLsp::Ree::ParsedFilePathLinkNode

Inherits:
ParsedLinkNode show all
Defined in:
lib/ruby_lsp/ruby_lsp_ree/parsing/parsed_file_path_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

#first_arg_location, #from_arg_value, #has_import_section?, #has_kwargs?, #has_linked_object?, #import_link_type?, #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

#file_path_type?Boolean

Returns:

  • (Boolean)


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

def file_path_type?
  true
end

#import_block_close_locationObject



20
21
22
# File 'lib/ruby_lsp/ruby_lsp_ree/parsing/parsed_file_path_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_file_path_link_node.rb', line 16

def import_block_open_location
  import_arg.opening_loc
end


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

def link_package_name
  @name.split('/').first
end


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

def link_type
  :file_path
end