class RBS::AST::Declarations::AliasDecl
Attributes
annotations
[R]
Array[Annotation]
comment
[R]
Comment?
location
[R]
loc?
Public Class Methods
(new_name: TypeName, old_name: TypeName, location: loc?, comment: Comment?, annotations: Array[Annotation]) → void
(new_name: TypeName, old_name: TypeName, location: loc?, comment: Comment?) → void
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/lib/rbs/ast/declarations.rb, line 426 def initialize(new_name:, old_name:, location:, comment:, annotations: []) @new_name = new_name @old_name = old_name @location = location @comment = comment @annotations = annotations end
Public Instance Methods
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/lib/rbs/ast/declarations.rb, line 434 def ==(other) other.is_a?(self.class) && other.new_name == new_name && other.old_name == old_name end
Also aliased as: eql?
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/lib/rbs/ast/declarations.rb, line 442 def hash self.class.hash ^ new_name.hash ^ old_name.hash end