Class: LintTrap::Container::Base
- Inherits:
-
Object
- Object
- LintTrap::Container::Base
- Defined in:
- lib/lint_trap/container/base.rb
Overview
Interface for a container
Constant Summary collapse
- ImagePullError =
Class.new(ExecutionError)
- LOCAL_CONFIG_PATH =
Pathname.new(File.('../../../../config', __FILE__))
Instance Attribute Summary collapse
-
#image ⇒ Object
readonly
Returns the value of attribute image.
Instance Method Summary collapse
- #config_path(_path) ⇒ Object
- #file_path(_path) ⇒ Object
-
#initialize(image, repo_path, options = {}) ⇒ Base
constructor
A new instance of Base.
- #pull ⇒ Object
- #wrap(_command) ⇒ Object
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, = {}) @image = image @repo_path = Pathname.new(repo_path) @options = .merge() end |
Instance Attribute Details
#image ⇒ Object (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
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
32 33 34 |
# File 'lib/lint_trap/container/base.rb', line 32 def file_path(_path) raise NotImplementedError, 'Must implement file_path.' end |
#pull ⇒ Object
20 21 22 |
# File 'lib/lint_trap/container/base.rb', line 20 def pull raise NotImplementedError, 'Must implement pull.' end |
#wrap(_command) ⇒ Object
24 25 26 |
# File 'lib/lint_trap/container/base.rb', line 24 def wrap(_command) raise NotImplementedError, 'Must implement wrap.' end |