Class: Kamal::Configuration::Volume

Inherits:
Object
  • Object
show all
Defined in:
lib/kamal/configuration/volume.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(host_path:, container_path:) ⇒ Volume

Returns a new instance of Volume.



5
6
7
8
# File 'lib/kamal/configuration/volume.rb', line 5

def initialize(host_path:, container_path:)
  @host_path = host_path
  @container_path = container_path
end

Instance Attribute Details

#container_pathObject (readonly)

Returns the value of attribute container_path.



2
3
4
# File 'lib/kamal/configuration/volume.rb', line 2

def container_path
  @container_path
end

#host_pathObject (readonly)

Returns the value of attribute host_path.



2
3
4
# File 'lib/kamal/configuration/volume.rb', line 2

def host_path
  @host_path
end

Instance Method Details

#docker_argsObject



10
11
12
# File 'lib/kamal/configuration/volume.rb', line 10

def docker_args
  argumentize "--volume", "#{host_path_for_docker_volume}:#{container_path}"
end