Sha256: c9319555e0cc27c4401b736a70b7f2f6b769bcbc4fa85ea071e4456a21e8ebb7

Contents?: true

Size: 700 Bytes

Versions: 1

Compression:

Stored size: 700 Bytes

Contents

module EventSourcery
  module Memory
    class Config
      attr_accessor :event_tracker,
                    :event_store,
                    :event_source,
                    :event_sink

      def initialize
        @event_tracker = Memory::Tracker.new
      end

      def event_store
        @event_store ||= EventStore.new
      end

      def event_source
        @event_source ||= ::EventSourcery::EventStore::EventSource.new(event_store)
      end

      def event_sink
        @event_sink ||= ::EventSourcery::EventStore::EventSink.new(event_store)
      end

    end

    def self.configure
      yield config
    end

    def self.config
      @config ||= Config.new
    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
event_sourcery-0.15.0 lib/event_sourcery/memory/config.rb