%PDF- %PDF-
| Direktori : /var/lib/rbenv/versions/3.1.4/lib64/ruby/gems/3.1.0/gems/rbs-2.7.0/lib/rbs/ |
| Current File : /var/lib/rbenv/versions/3.1.4/lib64/ruby/gems/3.1.0/gems/rbs-2.7.0/lib/rbs/constant.rb |
# frozen_string_literal: true
module RBS
class Constant
attr_reader :name
attr_reader :type
attr_reader :entry
def initialize(name:, type:, entry:)
@name = name
@type = type
@entry = entry
end
def ==(other)
other.is_a?(Constant) &&
other.name == name &&
other.type == type &&
other.entry == entry
end
alias eql? ==
def hash
self.class.hash ^ name.hash ^ type.hash ^ entry.hash
end
end
end