Class: Rhea::Kubernetes::Commands::Import

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

Constant Summary

Constants inherited from Base

Base::NAMESPACE

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ Import

Returns a new instance of Import.



7
8
9
# File 'lib/rhea/kubernetes/commands/import.rb', line 7

def initialize(data)
  self.data = data
end

Instance Attribute Details

#dataObject

Returns the value of attribute data.



5
6
7
# File 'lib/rhea/kubernetes/commands/import.rb', line 5

def data
  @data
end

Instance Method Details

#performObject



11
12
13
14
15
16
# File 'lib/rhea/kubernetes/commands/import.rb', line 11

def perform
  commands_data = data['commands']
  commands_data.each do |command_data|
    Scale.new(expression: command_data['expression'], process_count: command_data['process_count'], image: command_data['image']).perform
  end
end