Class: Kamal::Configuration::Servers

Inherits:
Object
  • Object
show all
Includes:
Validation
Defined in:
lib/kamal/configuration/servers.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Validation

#validate!, #validation_yml

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

#configObject (readonly)

Returns the value of attribute config.



4
5
6
# File 'lib/kamal/configuration/servers.rb', line 4

def config
  @config
end

#rolesObject (readonly)

Returns the value of attribute roles.



4
5
6
# File 'lib/kamal/configuration/servers.rb', line 4

def roles
  @roles
end

#servers_configObject (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