Class: Holodekk::Image::Instructions::Volume
- Inherits:
-
Builder::Instruction
- Object
- Builder::Instruction
- Holodekk::Image::Instructions::Volume
- Defined in:
- lib/holodekk/image/instructions/volume.rb
Instance Attribute Summary collapse
-
#volumes ⇒ Object
Returns the value of attribute volumes.
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Builder::Instruction
#as_json, instruction_tag, tag, #tag, #to_json
Instance Attribute Details
#volumes ⇒ Object
Returns the value of attribute volumes.
7 8 9 |
# File 'lib/holodekk/image/instructions/volume.rb', line 7 def volumes @volumes end |
Class Method Details
.build(*volumes) ⇒ Object
11 12 13 |
# File 'lib/holodekk/image/instructions/volume.rb', line 11 def self.build(*volumes) new({ volumes: volumes }) end |
Instance Method Details
#to_dockerfile ⇒ Object
15 16 17 18 19 20 21 22 23 |
# File 'lib/holodekk/image/instructions/volume.rb', line 15 def to_dockerfile builder = Docker::Dockerfile::InstructionBuilder.new(self) builder.value_array( *volumes.map do |v| Docker::Dockerfile::InstructionBuilder::QuotedString.new(v) end ) builder.output end |