Class: RBS::Inline::AST::Members::RubyAlias
- Defined in:
- lib/rbs/inline/ast/members.rb,
sig/generated/rbs/inline/ast/members.rbs
Instance Attribute Summary collapse
-
#comments ⇒ AnnotationParser::ParsingResult?
readonly
: AnnotationParser::ParsingResult?.
-
#node ⇒ Prism::AliasMethodNode
readonly
: Prism::AliasMethodNode.
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(node, comments) ⇒ RubyAlias
constructor
A new instance of RubyAlias.
- #new_name ⇒ Symbol
- #old_name ⇒ Symbol
Methods inherited from Base
Constructor Details
#initialize(node, comments) ⇒ RubyAlias
Returns a new instance of RubyAlias.
321 322 323 324 325 326 |
# File 'lib/rbs/inline/ast/members.rb', line 321 def initialize(node, comments) #: void @node = node @comments = comments super(node.location) end |
Instance Attribute Details
#comments ⇒ AnnotationParser::ParsingResult? (readonly)
: AnnotationParser::ParsingResult?
317 318 319 |
# File 'lib/rbs/inline/ast/members.rb', line 317 def comments @comments end |
#node ⇒ Prism::AliasMethodNode (readonly)
: Prism::AliasMethodNode
316 317 318 |
# File 'lib/rbs/inline/ast/members.rb', line 316 def node @node end |
Instance Method Details
#new_name ⇒ Symbol
336 337 338 339 340 |
# File 'lib/rbs/inline/ast/members.rb', line 336 def new_name raise unless node.new_name.is_a?(Prism::SymbolNode) value = node.new_name.value or raise value.to_sym end |
#old_name ⇒ Symbol
329 330 331 332 333 |
# File 'lib/rbs/inline/ast/members.rb', line 329 def old_name raise unless node.old_name.is_a?(Prism::SymbolNode) value = node.old_name.value or raise value.to_sym end |