Class: RubyEventStore::CLI::Commands::Stats

Inherits:
Base
  • Object
show all
Defined in:
lib/ruby_event_store/cli/commands/stats.rb

Instance Method Summary collapse

Instance Method Details

#call(stream: nil) ⇒ Object



14
15
16
17
18
19
20
# File 'lib/ruby_event_store/cli/commands/stats.rb', line 14

def call(stream: nil, **)
  specification = stream ? event_store.read.stream(stream) : event_store.read
  print_stats(specification, stream: stream)
rescue => e
  warn e.message
  exit 1
end