Class: Yoda::Store::Project::LibraryDocLoader
- Inherits:
-
Object
- Object
- Yoda::Store::Project::LibraryDocLoader
- Defined in:
- lib/yoda/store/project/library_doc_loader.rb
Instance Attribute Summary collapse
- #errors ⇒ Object readonly
- #gem_specs ⇒ Object readonly
- #registry ⇒ Registry readonly
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(registry:, gem_specs:) ⇒ LibraryDocLoader
constructor
A new instance of LibraryDocLoader.
- #run ⇒ Object
Constructor Details
#initialize(registry:, gem_specs:) ⇒ LibraryDocLoader
Returns a new instance of LibraryDocLoader.
41 42 43 44 45 |
# File 'lib/yoda/store/project/library_doc_loader.rb', line 41 def initialize(registry:, gem_specs:) @registry = registry @gem_specs = gem_specs @errors = [] end |
Instance Attribute Details
#errors ⇒ Object (readonly)
12 13 14 |
# File 'lib/yoda/store/project/library_doc_loader.rb', line 12 def errors @errors end |
#gem_specs ⇒ Object (readonly)
9 10 11 |
# File 'lib/yoda/store/project/library_doc_loader.rb', line 9 def gem_specs @gem_specs end |
#registry ⇒ Registry (readonly)
6 7 8 |
# File 'lib/yoda/store/project/library_doc_loader.rb', line 6 def registry @registry end |
Class Method Details
.build_for(project) ⇒ LibraryDocLoader
17 18 19 |
# File 'lib/yoda/store/project/library_doc_loader.rb', line 17 def build_for(project) new(registry: project.registry, gem_specs: gem_specs(project)) end |
Instance Method Details
#run ⇒ Object
47 48 49 50 51 |
# File 'lib/yoda/store/project/library_doc_loader.rb', line 47 def run project_status = registry.project_status || Objects::ProjectStatus.initial_build(specs: gem_specs) new_bundle_status = update_bundle(project_status.bundle) registry.save_project_status(project_status.derive(bundle: new_bundle_status)) end |