Class: Bundler::Codegraph::Backfill
- Inherits:
-
Object
- Object
- Bundler::Codegraph::Backfill
- Defined in:
- lib/bundler/codegraph/backfill.rb
Overview
Indexes a whole set of gem specs, one at a time: the queue
after_install_all drains at the end of bundle install, or the whole
resolved bundle for bundle codegraph-index.
Instance Attribute Summary collapse
-
#indexer_options ⇒ Object
readonly
Returns the value of attribute indexer_options.
-
#reporter ⇒ Object
readonly
Returns the value of attribute reporter.
-
#specs ⇒ Object
readonly
Returns the value of attribute specs.
Instance Method Summary collapse
-
#call ⇒ Hash{Symbol => Integer}
Number of gems per resulting status.
-
#initialize(specs, reporter: nil, **indexer_options) ⇒ Backfill
constructor
A new instance of Backfill.
Constructor Details
Instance Attribute Details
#indexer_options ⇒ Object (readonly)
Returns the value of attribute indexer_options.
11 12 13 |
# File 'lib/bundler/codegraph/backfill.rb', line 11 def @indexer_options end |
#reporter ⇒ Object (readonly)
Returns the value of attribute reporter.
11 12 13 |
# File 'lib/bundler/codegraph/backfill.rb', line 11 def reporter @reporter end |
#specs ⇒ Object (readonly)
Returns the value of attribute specs.
11 12 13 |
# File 'lib/bundler/codegraph/backfill.rb', line 11 def specs @specs end |
Instance Method Details
#call ⇒ Hash{Symbol => Integer}
Returns number of gems per resulting status.
25 26 27 28 29 30 31 |
# File 'lib/bundler/codegraph/backfill.rb', line 25 def call specs.each_with_object(Hash.new(0)) do |spec, results| name, status, log_hint = index(spec) results[status] += 1 reporter&.call(name, status, log_hint) end end |