Class: Rum::Docker::Run

Inherits:
Object
  • Object
show all
Extended by:
AttrCallable
Includes:
Executable
Defined in:
lib/rumrunner/docker.rb

Instance Attribute Summary

Attributes included from Executable

#options

Instance Method Summary collapse

Methods included from AttrCallable

attr_method_accessor

Methods included from Executable

#method_missing, #to_s, #with_defaults

Constructor Details

#initialize(options: nil, image: nil, cmd: nil, &block) ⇒ Run

Returns a new instance of Run.



116
117
118
119
120
# File 'lib/rumrunner/docker.rb', line 116

def initialize(options:nil, image:nil, cmd:nil, &block)
  @image = image
  @cmd   = cmd
  super options: options, &block
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Rum::Docker::Executable

Instance Method Details

#each {|@image| ... } ⇒ Object

Yields:

  • (@image)


122
123
124
125
126
# File 'lib/rumrunner/docker.rb', line 122

def each
  super{|x| yield x }
  yield @image
  @cmd.is_a?(Array) ? @cmd.each{|x| yield x } : yield(@cmd) unless @cmd.nil?
end