Flowdock
method

entry_versions

Importance_0
v2_5_5 - Show latest stable - 0 notes - Class: QueryCommand
entry_versions(entry, name_tuples, platforms, specs) private

No documentation

This method has no description. You can help the Ruby community by adding new notes.

Hide source
# File lib/rubygems/commands/query_command.rb, line 250
  def entry_versions entry, name_tuples, platforms, specs
    return unless options[:versions]

    list =
      if platforms.empty? or options[:details] then
        name_tuples.map { |n| n.version }.uniq
      else
        platforms.sort.reverse.map do |version, pls|
          out = version.to_s

          if options[:domain] == :local
            default = specs.any? do |s|
              !s.is_a?(Gem::Source) && s.version == version && s.default_gem?
            end
            out = "default: #{out}" if default
          end

          if pls != [Gem::Platform::RUBY] then
            platform_list = [pls.delete(Gem::Platform::RUBY), *pls.sort].compact
            out = platform_list.unshift(out).join(' ')
          end

          out
        end
      end

    entry << " (#{list.join ', '})"
  end
Register or log in to add new notes.