Class: Kamal::Configuration::Volume
- Inherits:
-
Object
- Object
- Kamal::Configuration::Volume
- Defined in:
- lib/kamal/configuration/volume.rb
Instance Attribute Summary collapse
-
#container_path ⇒ Object
readonly
Returns the value of attribute container_path.
-
#host_path ⇒ Object
readonly
Returns the value of attribute host_path.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
- #docker_args ⇒ Object
- #docker_args_string ⇒ Object
-
#initialize(host_path:, container_path:, options: nil) ⇒ Volume
constructor
A new instance of Volume.
Constructor Details
#initialize(host_path:, container_path:, options: nil) ⇒ Volume
Returns a new instance of Volume.
5 6 7 8 9 |
# File 'lib/kamal/configuration/volume.rb', line 5 def initialize(host_path:, container_path:, options: nil) @host_path = host_path @container_path = container_path @options = end |
Instance Attribute Details
#container_path ⇒ Object (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_path ⇒ Object (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 |
#options ⇒ Object (readonly)
Returns the value of attribute options.
2 3 4 |
# File 'lib/kamal/configuration/volume.rb', line 2 def @options end |
Instance Method Details
#docker_args ⇒ Object
11 12 13 |
# File 'lib/kamal/configuration/volume.rb', line 11 def docker_args argumentize "--volume", docker_args_string end |
#docker_args_string ⇒ Object
15 16 17 18 19 |
# File 'lib/kamal/configuration/volume.rb', line 15 def docker_args_string volume_string = "#{host_path_for_docker_volume}:#{container_path}" volume_string += ":#{}" if .present? volume_string end |