Class: Orchparty::Kubernetes::ChartBuilder

Inherits:
CommonBuilder show all
Defined in:
lib/orchparty/dsl_parser_kubernetes.rb

Instance Method Summary collapse

Methods inherited from CommonBuilder

#_build, #method_missing, #mix, #variables

Methods inherited from Builder

#assign_or_merge, build

Constructor Details

#initialize(name, application, type) ⇒ ChartBuilder

Returns a new instance of ChartBuilder.



339
340
341
342
# File 'lib/orchparty/dsl_parser_kubernetes.rb', line 339

def initialize(name, application, type)
  super AST.chart(name: name, _type: type )
  @application = application
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Orchparty::Kubernetes::CommonBuilder

Instance Method Details

#service(name, &block) ⇒ Object



344
345
346
347
348
349
350
351
352
# File 'lib/orchparty/dsl_parser_kubernetes.rb', line 344

def service(name, &block)
  result = ServiceBuilder.build(name, "chart-service", block)

  name = "chart-#{@node.name}-#{name}"
  @application.services[name] = result
  @application._service_order << name
  @node._services << name
  self
end