class Jazzy::SymbolGraph::ExtKey

An ExtKey identifies an extension of a type, made up of the USR of the type and the constraints of the extension. With Swift 5.9 extension symbols, the USR is the ‘fake’ USR invented by symbolgraph to solve the same problem as this type, which means less merging takes place.

Attributes

constraints_text[RW]
usr[RW]

Public Class Methods

new(usr, constraints) click to toggle source
# File lib/jazzy/symbol_graph/ext_key.rb, line 13
def initialize(usr, constraints)
  self.usr = usr
  self.constraints_text = constraints.map(&:to_swift).join
end

Public Instance Methods

eql?(other) click to toggle source
# File lib/jazzy/symbol_graph/ext_key.rb, line 22
def eql?(other)
  hash_key == other.hash_key
end
hash() click to toggle source
# File lib/jazzy/symbol_graph/ext_key.rb, line 26
def hash
  hash_key.hash
end
hash_key() click to toggle source
# File lib/jazzy/symbol_graph/ext_key.rb, line 18
def hash_key
  usr + constraints_text
end