Module: Algo::Dsl::Cluster

Included in:
Algo::Dsl
Defined in:
lib/algo/dsl/cluster.rb

Defined Under Namespace

Classes: Context

Instance Method Summary collapse

Instance Method Details

#cluster(name, &block) ⇒ Object



38
39
40
41
42
43
# File 'lib/algo/dsl/cluster.rb', line 38

def cluster name, &block
  ctx = Cluster::Context.new(name).tap do |ctx|
    ctx.instance_eval(&block)
  end
  @clusters << ctx.context
end