Class: DockerApp::Config::DSL

Inherits:
Object
  • Object
show all
Defined in:
lib/docker_app/config/dsl.rb

Overview

Context for loading user config.rb and model files.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeDSL

Returns a new instance of DSL.



13
14
15
16
# File 'lib/docker_app/config/dsl.rb', line 13

def initialize
  @_config_options = {}
  @_config_servers = {}
end

Instance Attribute Details

#_config_optionsObject (readonly)

class Error < Backup::Error; end Server = DockerApp::Server



10
11
12
# File 'lib/docker_app/config/dsl.rb', line 10

def _config_options
  @_config_options
end

#_config_serversObject (readonly)

Returns the value of attribute _config_servers.



11
12
13
# File 'lib/docker_app/config/dsl.rb', line 11

def _config_servers
  @_config_servers
end

Instance Method Details

#server(server_name, &block) ⇒ Object



37
38
39
40
41
42
# File 'lib/docker_app/config/dsl.rb', line 37

def server(server_name, &block)
  sc = ServerSettings.new
  block.call(sc)
  #sc.instance_eval(&block)
  _config_servers[server_name] = sc
end