Class: Textus::Handlers::Read::ListKeys
- Inherits:
-
Object
- Object
- Textus::Handlers::Read::ListKeys
- Defined in:
- lib/textus/handlers/read/list_keys.rb
Instance Method Summary collapse
- #call(command, _call) ⇒ Object
-
#initialize(manifest:, job_store: nil) ⇒ ListKeys
constructor
A new instance of ListKeys.
Constructor Details
#initialize(manifest:, job_store: nil) ⇒ ListKeys
Returns a new instance of ListKeys.
5 6 7 8 |
# File 'lib/textus/handlers/read/list_keys.rb', line 5 def initialize(manifest:, job_store: nil) @manifest = manifest @job_store = job_store end |
Instance Method Details
#call(command, _call) ⇒ Object
10 11 12 13 14 15 16 17 |
# File 'lib/textus/handlers/read/list_keys.rb', line 10 def call(command, _call) q = command.respond_to?(:q) ? command.q : nil schema = command.respond_to?(:schema) ? command.schema : nil return sqlite_list(q: q, schema: schema, lane: command.lane, prefix: command.prefix) if @job_store && (q || schema) manifest_list(prefix: command.prefix, lane: command.lane) end |