Class: Dru::Commands::Attach

Inherits:
Dru::ContainerCommand show all
Defined in:
lib/dru/commands/attach.rb

Constant Summary collapse

DOCKER_ATTACH_COMMAND =
'docker attach --detach-keys="ctrl-d"'.freeze

Constants inherited from Dru::Command

Dru::Command::DOCKER_COMPOSE_COMMAND

Instance Attribute Summary

Attributes inherited from Dru::Command

#options

Instance Method Summary collapse

Methods inherited from Dru::ContainerCommand

#initialize

Methods inherited from Dru::Command

#command, #container_name_to_id, #cursor, #default_docker_compose, #docker_compose_paths, #editor, #environment, #environment_docker_compose, #exec_exist?, #generator, #pager, #platform, #project_configuration_path, #project_name, #prompt, #run_docker_compose_command, #screen, #which

Constructor Details

This class inherits a constructor from Dru::ContainerCommand

Instance Method Details

#execute(input: $stdin, output: $stdout) ⇒ Object



11
12
13
# File 'lib/dru/commands/attach.rb', line 11

def execute(input: $stdin, output: $stdout)
  stop_docker_compose if attach_to_container
end