Module: ContainedMr

Defined in:
lib/contained_mr/namespace.rb

Overview

Namespace and factory for templates.

Defined Under Namespace

Modules: JobLogic, Mock, RunnerLogic, TemplateLogic Classes: Cleaner, Job, Runner, Template

Class Method Summary collapse

Class Method Details

.new_template(name_prefix, id, zip_io) ⇒ Object

Sets up the template and builds its Docker base image.

This method should be used instead of calling ContainedMr::Template.new directly. This way, tests can stub template_class to have it return ContainedMr::Mock::Template.

Parameters:

  • name_prefix (String)

    prepended to Docker objects, for identification purposes

  • id (String)

    the template’s unique identifier

  • zip_io (String)

    IO implementation that produces the template .zip



13
14
15
# File 'lib/contained_mr/namespace.rb', line 13

def self.new_template(name_prefix, id, zip_io)
  template_class.new name_prefix, id, zip_io
end

.template_classClass

The class instantiated by new_template.

Returns:



21
22
23
# File 'lib/contained_mr/namespace.rb', line 21

def self.template_class
  ContainedMr::Template
end