Method: CM::Plugin::DockerResource#command

Defined in:
lib/core/plugin/docker_resource.rb

#command(command, options = {}) ⇒ Object




208
209
210
211
212
213
214
215
# File 'lib/core/plugin/docker_resource.rb', line 208

def command(command, options = {})
  command = Nucleon.command(Nucleon::Config.new({ :command => command }, {}, true, false).import(options), :bash)
  Nucleon.remove_plugin(command)

  exec(command.to_s.strip) do |stream, message|
    yield(stream, message) if block_given?
  end
end