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

#clear_options, #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.



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

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:



202
203
204
205
# File 'lib/rumrunner/docker.rb', line 202

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

#pathObject

Access PATH with method.



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

attr_method_accessor :path