Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →
instance method
Gem::Source#content_addressable_metadata
content_addressable_metadata(name, rows)
lib/rubygems/source.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.1.0-preview1/lib/rubygems/source.rb, line 407
def content_addressable_metadata(name, rows)
wanted_rows = rows.map do |row|
ContentAddressableInfo.new(row[2], row[3], nil, nil)
end
available_rows = compact_index_info_rows(name).filter_map do |info_row|
version = info_row[Gem::CompactIndexClient::INFO_VERSION]
suffix = info_row[Gem::CompactIndexClient::INFO_SUFFIX]
requirements = compact_index_requirements(info_row)
platform = required_platform_from(requirements[:platform])
next unless platform
next unless requirements[:ruby]
ruby_abi = Gem::ContentAddress.ruby_abi_for(Gem::Requirement.new(requirements[:ruby]))
ContentAddressableInfo.new(version, suffix, ruby_abi, platform)
end
available_rows & wanted_rows
end
No documentation available