Class: Ace::Hitl::CLI::Commands::List

Inherits:
Support::Cli::Command
  • Object
show all
Includes:
Support::Cli::Base
Defined in:
lib/ace/hitl/cli/commands/list.rb

Instance Method Summary collapse

Instance Method Details

#call(**options) ⇒ Object



25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# File 'lib/ace/hitl/cli/commands/list.rb', line 25

def call(**options)
  scope = validate_scope(options[:scope])
  status = options[:status]
  kind = options[:kind]
  tags = parse_tags(options[:tags])
  in_folder = options[:in] || "next"

  manager = Ace::Hitl::Organisms::HitlManager.new
  events = manager.list(status: status, kind: kind, tags: tags, in_folder: in_folder, scope: scope)

  puts Ace::Hitl::Molecules::HitlDisplayFormatter.format_list(
    events,
    total_count: manager.last_list_total,
    global_folder_stats: manager.last_folder_counts
  )
end