Class: OdaniaStaticPages::Config::Deploy::DockerCompose
- Inherits:
-
Object
- Object
- OdaniaStaticPages::Config::Deploy::DockerCompose
- Defined in:
- lib/odania_static_pages/config/docker_compose.rb
Instance Attribute Summary collapse
-
#compose_images ⇒ Object
readonly
Returns the value of attribute compose_images.
-
#expires ⇒ Object
readonly
Returns the value of attribute expires.
-
#state_file ⇒ Object
readonly
Returns the value of attribute state_file.
-
#varnish_secret ⇒ Object
readonly
Returns the value of attribute varnish_secret.
Instance Method Summary collapse
-
#initialize(state_file: 'docker_compose_state.yml', compose_images: [], expires: '-1', varnish_secret: nil) ⇒ DockerCompose
constructor
A new instance of DockerCompose.
- #to_h ⇒ Object
Constructor Details
#initialize(state_file: 'docker_compose_state.yml', compose_images: [], expires: '-1', varnish_secret: nil) ⇒ DockerCompose
Returns a new instance of DockerCompose.
7 8 9 10 11 12 |
# File 'lib/odania_static_pages/config/docker_compose.rb', line 7 def initialize(state_file: 'docker_compose_state.yml', compose_images: [], expires: '-1', varnish_secret: nil) @state_file = state_file @compose_images = compose_images @expires = expires @varnish_secret = varnish_secret.nil? ? SecureRandom.hex : varnish_secret end |
Instance Attribute Details
#compose_images ⇒ Object (readonly)
Returns the value of attribute compose_images.
5 6 7 |
# File 'lib/odania_static_pages/config/docker_compose.rb', line 5 def compose_images @compose_images end |
#expires ⇒ Object (readonly)
Returns the value of attribute expires.
5 6 7 |
# File 'lib/odania_static_pages/config/docker_compose.rb', line 5 def expires @expires end |
#state_file ⇒ Object (readonly)
Returns the value of attribute state_file.
5 6 7 |
# File 'lib/odania_static_pages/config/docker_compose.rb', line 5 def state_file @state_file end |
#varnish_secret ⇒ Object (readonly)
Returns the value of attribute varnish_secret.
5 6 7 |
# File 'lib/odania_static_pages/config/docker_compose.rb', line 5 def varnish_secret @varnish_secret end |
Instance Method Details
#to_h ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/odania_static_pages/config/docker_compose.rb', line 14 def to_h { state_file: @state_file, compose_images: @compose_images, expires: @expires }.stringify_keys! end |