class RBS::AST::Declarations::AliasDecl

Attributes

comment[R]
location[R]
new_name[R]
old_name[R]

Public Class Methods

new(new_name:, old_name:, location:, comment:) click to toggle source
# File rbs-3.7.0/lib/rbs/ast/declarations.rb, line 422
def initialize(new_name:, old_name:, location:, comment:)
  @new_name = new_name
  @old_name = old_name
  @location = location
  @comment = comment
end

Public Instance Methods

==(other) click to toggle source
# File rbs-3.7.0/lib/rbs/ast/declarations.rb, line 429
def ==(other)
  other.is_a?(self.class) &&
    other.new_name == new_name &&
    other.old_name == old_name
end
Also aliased as: eql?
eql?(other)
Alias for: ==
hash() click to toggle source
# File rbs-3.7.0/lib/rbs/ast/declarations.rb, line 437
def hash
  self.class.hash ^ new_name.hash ^ old_name.hash
end