method
spec_platforms
v2_4_6 -
Show latest stable
-
0 notes -
Class: QueryCommand
- 1_8_6_287
- 1_8_7_72
- 1_8_7_330
- 1_9_1_378
- 1_9_2_180
- 1_9_3_125
- 1_9_3_392
- 2_1_10 (0)
- 2_2_9 (0)
- 2_4_6 (0)
- 2_5_5 (0)
- 2_6_3 (0)
- What's this?
spec_platforms(entry, platforms)
private
Hide source
# File lib/rubygems/commands/query_command.rb, line 332 def spec_platforms entry, platforms non_ruby = platforms.any? do |_, pls| pls.any? { |pl| pl != Gem::Platform::RUBY } end return unless non_ruby if platforms.length == 1 then title = platforms.values.length == 1 ? 'Platform' : 'Platforms' entry << " #{title}: #{platforms.values.sort.join ', '}\n" else entry << " Platforms:\n" platforms.sort_by do |version,| version end.each do |version, pls| label = " #{version}: " data = format_text pls.sort.join(', '), 68, label.length data[0, label.length] = label entry << data << "\n" end end end