module Algo::Dsl::Service

Public Instance Methods

service(name, &block) click to toggle source
# File lib/algo/dsl/service.rb, line 273
def service name, &block
  raise 'should be called in cluster' unless @context
  ctx = Service::Context.new(name, @context).tap do |ctx|
    ctx.instance_eval(&block)
  end
  @context['services'] << ctx.context
end