Class: Train::Transports::Docker::Connection
- Inherits:
-
BaseConnection
- Object
- BaseConnection
- Train::Transports::Docker::Connection
- Defined in:
- lib/train/transports/docker.rb
Instance Method Summary collapse
- #close ⇒ Object
-
#initialize(conf) ⇒ Connection
constructor
A new instance of Connection.
- #uri ⇒ Object
Constructor Details
#initialize(conf) ⇒ Connection
Returns a new instance of Connection.
58 59 60 61 62 63 64 65 66 |
# File 'lib/train/transports/docker.rb', line 58 def initialize(conf) super(conf) @id = [:host] @container = ::Docker::Container.get(@id) || fail("Can't find Docker container #{@id}") @cmd_wrapper = nil @cmd_wrapper = CommandWrapper.load(self, @options) self end |
Instance Method Details
#close ⇒ Object
68 69 70 |
# File 'lib/train/transports/docker.rb', line 68 def close # nothing to do at the moment end |
#uri ⇒ Object
72 73 74 75 76 77 78 |
# File 'lib/train/transports/docker.rb', line 72 def uri if @container.nil? "docker://#{@id}" else "docker://#{@container.id}" end end |