Class: Contained::Task::Base Abstract

Inherits:
Object
  • Object
show all
Includes:
SSHKit::DSL
Defined in:
lib/contained/task/base.rb

Overview

This class is abstract.

Direct Known Subclasses

Deploy, Setup

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(stdin:, stdout:, environment:, config:) ⇒ Base

Returns a new instance of Base.

Parameters:

  • stdin (IO)
  • stdout (IO)


19
20
21
22
23
24
# File 'lib/contained/task/base.rb', line 19

def initialize(stdin:, stdout:, environment:, config:)
  @stdin = stdin
  @stdout = stdout
  @environment = environment
  @config = config
end

Class Method Details

.execute!Object



11
12
13
# File 'lib/contained/task/base.rb', line 11

def self.execute!(...)
  new(...).execute!
end

Instance Method Details

#execute!Object

Raises:

  • (NotImplementedError)


26
27
28
# File 'lib/contained/task/base.rb', line 26

def execute!
  raise NotImplementedError, "#execute! undefined"
end