Class: EacDocker::Images::Templatized

Inherits:
Base
  • Object
show all
Defined in:
lib/eac_docker/images/templatized.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#container

Instance Attribute Details

#provide_dirObject

Returns the value of attribute provide_dir.



8
9
10
# File 'lib/eac_docker/images/templatized.rb', line 8

def provide_dir
  @provide_dir
end

Instance Method Details

#coded_image(provide_dir) ⇒ Object



24
25
26
# File 'lib/eac_docker/images/templatized.rb', line 24

def coded_image(provide_dir)
  ::EacDocker::Images::Coded.new(provide_dir)
end

#idObject



10
11
12
# File 'lib/eac_docker/images/templatized.rb', line 10

def id
  tag
end

#provideObject



14
15
16
17
18
19
20
21
22
# File 'lib/eac_docker/images/templatized.rb', line 14

def provide
  ::EacRubyUtils::Fs::Temp.on_directory do |provide_dir|
    self.provide_dir = provide_dir
    write_in_provide_dir
    coded_image(provide_dir).tag(tag).provide
  ensure
    self.provide_dir = nil
  end
end