class Rum::Docker::Run

Docker run command object.

Public Class Methods

new(options:nil, image:nil, cmd:nil, &block) click to toggle source

Initialize Docker run command with OPTIONS, IMAGE, and CMD. Evaluates the &block if given.

Calls superclass method Rum::Docker::Executable::new
# File lib/rumrunner/docker.rb, line 221
def initialize(options:nil, image:nil, cmd:nil, &block)
  @image = image
  @cmd   = cmd
  super options: options, &block
end

Public Instance Methods

each() { |x| ... } click to toggle source

Yield the Docker run commmand word-by-word.

Calls superclass method Rum::Docker::Executable#each
# File lib/rumrunner/docker.rb, line 229
def each
  super{|x| yield x }
  yield @image
  @cmd.is_a?(Array) ? @cmd.each{|x| yield x } : yield(@cmd) unless @cmd.nil?
end
image() click to toggle source

Access IMAGE and CMD with method.

# File lib/rumrunner/docker.rb, line 216
attr_method_accessor :image, :cmd