Class: RubyLsp::Ree::ParsedLinkNode::ImportItem
- Inherits:
-
Object
- Object
- RubyLsp::Ree::ParsedLinkNode::ImportItem
- Defined in:
- lib/ruby_lsp/ruby_lsp_ree/parsing/parsed_link_node.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#original_name ⇒ Object
readonly
Returns the value of attribute original_name.
Instance Method Summary collapse
-
#initialize(name:, original_name: nil) ⇒ ImportItem
constructor
A new instance of ImportItem.
- #to_s ⇒ Object
Constructor Details
#initialize(name:, original_name: nil) ⇒ ImportItem
Returns a new instance of ImportItem.
13 14 15 16 |
# File 'lib/ruby_lsp/ruby_lsp_ree/parsing/parsed_link_node.rb', line 13 def initialize(name:, original_name: nil) @name = name @original_name = original_name end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
11 12 13 |
# File 'lib/ruby_lsp/ruby_lsp_ree/parsing/parsed_link_node.rb', line 11 def name @name end |
#original_name ⇒ Object (readonly)
Returns the value of attribute original_name.
11 12 13 |
# File 'lib/ruby_lsp/ruby_lsp_ree/parsing/parsed_link_node.rb', line 11 def original_name @original_name end |
Instance Method Details
#to_s ⇒ Object
18 19 20 21 22 23 24 |
# File 'lib/ruby_lsp/ruby_lsp_ree/parsing/parsed_link_node.rb', line 18 def to_s if @original_name "#{@original_name}.as(#{@name})" else @name end end |