Class: Rhea::Kubernetes::Commands::Export

Inherits:
Base
  • Object
show all
Defined in:
lib/rhea/kubernetes/commands/export.rb

Constant Summary

Constants inherited from Base

Base::NAMESPACE

Instance Method Summary collapse

Instance Method Details

#performObject



5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/rhea/kubernetes/commands/export.rb', line 5

def perform
  commands = All.new.perform
  commands_data = commands.map do |command|
    {
      expression: command.expression,
      image: command.image,
      process_count: command.process_count
    }
  end
  {
    version: Rhea::VERSION,
    created_at: Time.now.utc,
    commands: commands_data
  }
end