Skip to content

Commit

Permalink
Add IndexSet#pretty_print
Browse files Browse the repository at this point in the history
  • Loading branch information
drbrain committed Nov 27, 2013
1 parent 2d897b5 commit d5a3077
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions lib/rubygems/resolver/index_set.rb
Expand Up @@ -46,5 +46,29 @@ def find_all req
res
end

def pretty_print q # :nodoc:
q.group 2, '[IndexSet', ']' do
q.breakable
q.text 'sources:'
q.breakable
q.pp @f.sources

q.breakable
q.text 'specs:'

q.breakable

names = @all.values.map do |tuples|
tuples.map do |_, tuple|
tuple.full_name
end
end.flatten

q.seplist names do |name|
q.text name
end
end
end

end

0 comments on commit d5a3077

Please sign in to comment.