Class: Rum::Docker::Build

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

Overview

Docker build command object.

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, path: nil, &block) ⇒ Build

Initialize Docker build command with OPTIONS and PATH. Evaluates the &block if given.



188
189
190
191
# File 'lib/rumrunner/docker.rb', line 188

def initialize(options:nil, path:nil, &block)
  @path = path
  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 {|@path || "."| ... } ⇒ Object

Yield the Docker build commmand word-by-word.

Yields:



195
196
197
198
# File 'lib/rumrunner/docker.rb', line 195

def each
  super{|x| yield x }
  yield @path || "."
end

#pathObject

Access PATH with method.



183
# File 'lib/rumrunner/docker.rb', line 183

attr_method_accessor :path