Class: Rum::Docker::Run
- Inherits:
-
Object
- Object
- Rum::Docker::Run
- Extended by:
- AttrCallable
- Includes:
- Executable
- Defined in:
- lib/rumrunner/docker.rb
Instance Attribute Summary
Attributes included from Executable
Instance Method Summary collapse
- #each {|@image| ... } ⇒ Object
-
#initialize(options: nil, image: nil, cmd: nil, &block) ⇒ Run
constructor
A new instance of Run.
Methods included from AttrCallable
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: , &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
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 |