Class: Laws::Commands::ECS
- Inherits:
-
Object
- Object
- Laws::Commands::ECS
- Defined in:
- lib/laws/commands/ecs.rb
Instance Method Summary collapse
- #execute_command ⇒ Object
-
#initialize(prompt) ⇒ ECS
constructor
A new instance of ECS.
Constructor Details
#initialize(prompt) ⇒ ECS
Returns a new instance of ECS.
4 5 6 |
# File 'lib/laws/commands/ecs.rb', line 4 def initialize(prompt) @prompt = prompt end |
Instance Method Details
#execute_command ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/laws/commands/ecs.rb', line 8 def execute_command selected_cluster = select_cluster return if selected_cluster.nil? selected_task = select_task(selected_cluster) return if selected_task.nil? task_id = selected_task.task_arn.split('/').last selected_container = select_container(selected_task) command = prompt_for_command execute_aws_command(selected_cluster, task_id, selected_container, command) end |