Class: Rhea::Kubernetes::Commands::Import
- Defined in:
- lib/rhea/kubernetes/commands/import.rb
Constant Summary
Constants inherited from Base
Instance Attribute Summary collapse
-
#data ⇒ Object
Returns the value of attribute data.
Instance Method Summary collapse
-
#initialize(data) ⇒ Import
constructor
A new instance of Import.
- #perform ⇒ Object
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
#data ⇒ Object
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
#perform ⇒ Object
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 |