Class: RBS::Inline::AST::Members::RubyAlias
- Defined in:
- lib/rbs/inline/ast/members.rb
Instance Attribute Summary collapse
-
#comments ⇒ Object
readonly
: AnnotationParser::ParsingResult?.
-
#node ⇒ Object
readonly
: Prism::AliasMethodNode.
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(node, comments) ⇒ RubyAlias
constructor
A new instance of RubyAlias.
- #new_name ⇒ Object
- #old_name ⇒ Object
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 ⇒ Object (readonly)
: AnnotationParser::ParsingResult?
317 318 319 |
# File 'lib/rbs/inline/ast/members.rb', line 317 def comments @comments end |
#node ⇒ Object (readonly)
: Prism::AliasMethodNode
316 317 318 |
# File 'lib/rbs/inline/ast/members.rb', line 316 def node @node end |
Instance Method Details
#new_name ⇒ Object
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 ⇒ Object
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 |