Class: Yoda::Store::Registry::ProjectRegistry
- Inherits:
-
Object
- Object
- Yoda::Store::Registry::ProjectRegistry
- Extended by:
- Forwardable
- Includes:
- HasServices
- Defined in:
- lib/yoda/store/registry/project_registry.rb
Instance Attribute Summary collapse
-
#project ⇒ Object
readonly
Returns the value of attribute project.
Class Method Summary collapse
Instance Method Summary collapse
- #adapter ⇒ Adapters::Base
-
#initialize(project) ⇒ ProjectRegistry
constructor
A new instance of ProjectRegistry.
- #libraries ⇒ LibraryRegistrySet
- #local_store ⇒ LocalStore
- #pretty_print(pp) ⇒ Object
- #root_store ⇒ Object
Methods included from HasServices
Constructor Details
#initialize(project) ⇒ ProjectRegistry
Returns a new instance of ProjectRegistry.
26 27 28 29 |
# File 'lib/yoda/store/registry/project_registry.rb', line 26 def initialize(project) fail TypeError, project unless project.is_a?(Project) @project = project end |
Instance Attribute Details
#project ⇒ Object (readonly)
Returns the value of attribute project.
16 17 18 |
# File 'lib/yoda/store/registry/project_registry.rb', line 16 def project @project end |
Class Method Details
.for_project(project) ⇒ Object
20 21 22 |
# File 'lib/yoda/store/registry/project_registry.rb', line 20 def for_project(project) new(project) end |
Instance Method Details
#adapter ⇒ Adapters::Base
50 51 52 53 54 |
# File 'lib/yoda/store/registry/project_registry.rb', line 50 def adapter @adapter ||= begin Adapters.for(project.project_registry_path) end end |
#libraries ⇒ LibraryRegistrySet
40 41 42 |
# File 'lib/yoda/store/registry/project_registry.rb', line 40 def libraries @libraries ||= Registry::LibraryRegistrySet.new(project: project, adapter: adapter, on_change: -> { clear_cache }) end |
#local_store ⇒ LocalStore
45 46 47 |
# File 'lib/yoda/store/registry/project_registry.rb', line 45 def local_store @local_store ||= Registry::LocalStore.new(on_change: -> { clear_cache }) end |
#pretty_print(pp) ⇒ Object
57 58 59 60 61 62 63 |
# File 'lib/yoda/store/registry/project_registry.rb', line 57 def pretty_print(pp) pp.object_group(self) do pp.breakable pp.text "@adapter=" pp.pp adapter end end |