Sha256: 8e48249e2248abde05a0364058c02c655fd568ea2205feb317b8f69786b15958

Contents?: true

Size: 403 Bytes

Versions: 2

Compression:

Stored size: 403 Bytes

Contents

require_relative 'container'

module Main
  module Requests
    class Registrar
      attr_reader :container

      def initialize(container)
        @container = container
      end

      def define(identifier, &block)
        container.register(identifier, container[:transaction].define(&block))
      end
    end

    def self.define(&block)
      yield(Registrar.new(Container))
    end
  end
end

Version data entries

2 entries across 2 versions & 2 rubygems

Version Path
dry-web-0.1.0 spec/dummy/apps/main/core/main/requests.rb
rodakase-0.0.1 spec/dummy/apps/main/core/main/requests.rb