Class: DockerApp::Config::DSL
- Inherits:
-
Object
- Object
- DockerApp::Config::DSL
- Defined in:
- lib/docker_app/config/dsl.rb
Overview
Context for loading user config.rb and model files.
Instance Attribute Summary collapse
-
#_config_options ⇒ Object
readonly
class Error < Backup::Error; end Server = DockerApp::Server.
-
#_config_servers ⇒ Object
readonly
Returns the value of attribute _config_servers.
Instance Method Summary collapse
-
#initialize ⇒ DSL
constructor
A new instance of DSL.
- #server(server_name, &block) ⇒ Object
Constructor Details
#initialize ⇒ DSL
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_options ⇒ Object (readonly)
class Error < Backup::Error; end Server = DockerApp::Server
10 11 12 |
# File 'lib/docker_app/config/dsl.rb', line 10 def @_config_options end |
#_config_servers ⇒ Object (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 |