Class: Ea::Cli::Command::Stats

Inherits:
Base
  • Object
show all
Defined in:
lib/ea/cli/command/stats.rb

Overview

ea stats FILE

Standalone — does not require lutaml-uml. Reads the QEA database directly and prints per-collection counts.

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Ea::Cli::Command::Base

Instance Method Details

#callObject



11
12
13
14
15
16
# File 'lib/ea/cli/command/stats.rb', line 11

def call
  db = load_database
  stats = db.stats
  rows = stats.map { |k, v| [k, v] }
  formatter.render(rows, columns: %i[collection count])
end