Class: Indocker::ContainerDirectives::From

Inherits:
Base show all
Defined in:
lib/indocker/directives/container_directives/from.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#after_start?, #after_stop?, #before_start?, #before_stop?

Methods inherited from Directives::Base

#build_directive?, #container_directive?, #partial?, #prepare_directive?

Constructor Details

#initialize(repo, tag: Indocker::ImageMetadata::DEFAULT_TAG) ⇒ From

Returns a new instance of From.



4
5
6
7
# File 'lib/indocker/directives/container_directives/from.rb', line 4

def initialize(repo, tag: Indocker::ImageMetadata::DEFAULT_TAG)
  @repo = repo
  @tag  = tag
end

Instance Attribute Details

#repo ⇒ Object

Returns the value of attribute repo.



2
3
4
# File 'lib/indocker/directives/container_directives/from.rb', line 2

def repo
  @repo
end

#tag ⇒ Object

Returns the value of attribute tag.



2
3
4
# File 'lib/indocker/directives/container_directives/from.rb', line 2

def tag
  @tag
end

Instance Method Details

#image ⇒ Object



9
10
11
# File 'lib/indocker/directives/container_directives/from.rb', line 9

def image
  "#{@repo}:#{@tag}"
end