Class: Shadwire::Commands::List
- Inherits:
-
Object
- Object
- Shadwire::Commands::List
- Defined in:
- lib/shadwire/commands/list.rb
Overview
Lists the registry catalog: one entry (name/type/title/description) per published item. Read-only — needs a registry but no Rails app. With json: true it emits the catalog array; otherwise a "name — title" line each.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(root:, registry: nil, json: false, ui: UI.new) ⇒ List
constructor
A new instance of List.
Constructor Details
Instance Method Details
#call ⇒ Object
18 19 20 21 22 23 |
# File 'lib/shadwire/commands/list.rb', line 18 def call client = RegistryClient.new(@registry_override || Config.load(@root).registry) items = client.index.fetch("items", []) emit(items) items end |