Class: Orchparty::ApplicationBuilder
- Defined in:
- lib/orchparty/dsl_parser.rb
Instance Method Summary collapse
- #_build ⇒ Object
- #all(&block) ⇒ Object
-
#initialize(name) ⇒ ApplicationBuilder
constructor
A new instance of ApplicationBuilder.
- #mix(name) ⇒ Object
- #mixin(name, &block) ⇒ Object
- #networks(&block) ⇒ Object
- #service(name, &block) ⇒ Object
- #variables(&block) ⇒ Object
- #volumes(&block) ⇒ Object
Methods inherited from Builder
Constructor Details
#initialize(name) ⇒ ApplicationBuilder
Returns a new instance of ApplicationBuilder.
102 103 104 |
# File 'lib/orchparty/dsl_parser.rb', line 102 def initialize(name) @application = AST.application(name:) end |
Instance Method Details
#_build ⇒ Object
139 140 141 |
# File 'lib/orchparty/dsl_parser.rb', line 139 def _build @application end |
#all(&block) ⇒ Object
115 116 117 118 |
# File 'lib/orchparty/dsl_parser.rb', line 115 def all(&block) @application.all = AllBuilder.build(block) self end |
#mix(name) ⇒ Object
106 107 108 |
# File 'lib/orchparty/dsl_parser.rb', line 106 def mix(name) @application._mix << name end |
#mixin(name, &block) ⇒ Object
110 111 112 113 |
# File 'lib/orchparty/dsl_parser.rb', line 110 def mixin(name, &block) @application._mixins[name] = ApplicationMixinBuilder.build(block) self end |
#networks(&block) ⇒ Object
130 131 132 |
# File 'lib/orchparty/dsl_parser.rb', line 130 def networks(&block) @application.networks = HashBuilder.build(block) end |
#service(name, &block) ⇒ Object
134 135 136 137 |
# File 'lib/orchparty/dsl_parser.rb', line 134 def service(name, &block) @application.services[name] = ServiceBuilder.build(name, block) self end |
#variables(&block) ⇒ Object
120 121 122 123 |
# File 'lib/orchparty/dsl_parser.rb', line 120 def variables(&block) @application._variables = VariableBuilder.build(block) self end |
#volumes(&block) ⇒ Object
125 126 127 128 |
# File 'lib/orchparty/dsl_parser.rb', line 125 def volumes(&block) @application.volumes = HashBuilder.build(block) self end |