Class: Kamal::Configuration::Servers
- Inherits:
-
Object
- Object
- Kamal::Configuration::Servers
- Includes:
- Validation
- Defined in:
- lib/kamal/configuration/servers.rb
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
-
#roles ⇒ Object
readonly
Returns the value of attribute roles.
-
#servers_config ⇒ Object
readonly
Returns the value of attribute servers_config.
Instance Method Summary collapse
-
#initialize(config:) ⇒ Servers
constructor
A new instance of Servers.
Methods included from Validation
Constructor Details
#initialize(config:) ⇒ Servers
Returns a new instance of Servers.
6 7 8 9 10 11 12 |
# File 'lib/kamal/configuration/servers.rb', line 6 def initialize(config:) @config = config @servers_config = config.raw_config.servers validate! servers_config, with: Kamal::Configuration::Validator::Servers @roles = role_names.map { |role_name| Kamal::Configuration::Role.new role_name, config: config } end |
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
4 5 6 |
# File 'lib/kamal/configuration/servers.rb', line 4 def config @config end |
#roles ⇒ Object (readonly)
Returns the value of attribute roles.
4 5 6 |
# File 'lib/kamal/configuration/servers.rb', line 4 def roles @roles end |
#servers_config ⇒ Object (readonly)
Returns the value of attribute servers_config.
4 5 6 |
# File 'lib/kamal/configuration/servers.rb', line 4 def servers_config @servers_config end |