Class: Moose::Inventory::Cli::Audit

Inherits:
Thor
  • Object
show all
Includes:
Helpers
Defined in:
lib/moose_inventory/cli/audit.rb

Overview

Audit log inspection commands.

Constant Summary

Constants included from Helpers

Helpers::AUTOMATIC_GROUP

Instance Method Summary collapse

Instance Method Details

#listObject



16
17
18
19
20
21
22
23
# File 'lib/moose_inventory/cli/audit.rb', line 16

def list
  events = inventory_context.audit_events(limit: options[:limit]).map { |event| serialize_event(event) }
  if options[:format]
    fmt.dump(events, options[:format].downcase)
  else
    render_human_events(events)
  end
end