Module: Protege::Manifest
- Defined in:
- lib/protege/extensions/manifest.rb
Overview
The read-only facade over the extension registries — one place the dashboard asks "what extensions of
this type exist, and what is their metadata?". Generalizes the tools-only ToolMixin.registered into a
uniform lookup across all four types, each row a plain Entry carrying the Manifested metadata plus
the class itself.
Defined Under Namespace
Classes: Entry
Constant Summary collapse
- BASES =
The extension base class for each manifest type (referenced lazily so the facade loads before them).
{ tool: 'Protege::Tool', provider: 'Protege::Provider', hook: 'Protege::Hook', resolver: 'Protege::Resolver' }.freeze
Class Method Summary collapse
-
.entry(type:, id:) ⇒ Entry?
The manifest entry for a single extension id, or nil when none is registered under it.
-
.registered(type) ⇒ Array<Entry>
Every registered extension of a type, as Entrys sorted by display name.
Class Method Details
.entry(type:, id:) ⇒ Entry?
The manifest entry for a single extension id, or nil when none is registered under it.
35 36 37 38 |
# File 'lib/protege/extensions/manifest.rb', line 35 def entry(type:, id:) klass = base(type).registered.find { |candidate| candidate.id == id } entry_for(type:, klass:) if klass end |