Class: LintTrap::Container::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/lint_trap/container/base.rb

Overview

Interface for a container

Direct Known Subclasses

Docker, Fake

Constant Summary collapse

ImagePullError =
Class.new(ExecutionError)
LOCAL_CONFIG_PATH =
Pathname.new(File.expand_path('../../../../config', __FILE__))

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(image, repo_path, options = {}) ⇒ Base

Returns a new instance of Base.



14
15
16
17
18
# File 'lib/lint_trap/container/base.rb', line 14

def initialize(image, repo_path, options = {})
  @image = image
  @repo_path = Pathname.new(repo_path)
  @options = default_options.merge(options)
end

Instance Attribute Details

#imageObject (readonly)

Returns the value of attribute image.



12
13
14
# File 'lib/lint_trap/container/base.rb', line 12

def image
  @image
end

Instance Method Details

#config_path(_path) ⇒ Object

Raises:

  • (NotImplementedError)


28
29
30
# File 'lib/lint_trap/container/base.rb', line 28

def config_path(_path)
  raise NotImplementedError, 'Must implement config_path.'
end

#file_path(_path) ⇒ Object

Raises:

  • (NotImplementedError)


32
33
34
# File 'lib/lint_trap/container/base.rb', line 32

def file_path(_path)
  raise NotImplementedError, 'Must implement file_path.'
end

#pullObject

Raises:

  • (NotImplementedError)


20
21
22
# File 'lib/lint_trap/container/base.rb', line 20

def pull
  raise NotImplementedError, 'Must implement pull.'
end

#wrap(_command) ⇒ Object

Raises:

  • (NotImplementedError)


24
25
26
# File 'lib/lint_trap/container/base.rb', line 24

def wrap(_command)
  raise NotImplementedError, 'Must implement wrap.'
end