Sha256: 9f71c86219b898b8d1664bd519c8e8854ffcc0398a6ad610c026d8722288010f

Contents?: true

Size: 657 Bytes

Versions: 11

Compression:

Stored size: 657 Bytes

Contents

module EventSourcery
  module Memory
    class Config
      attr_accessor :event_tracker
      attr_writer :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

11 entries across 11 versions & 1 rubygems

Version Path
event_sourcery-1.0.0 lib/event_sourcery/memory/config.rb
event_sourcery-0.24.0 lib/event_sourcery/memory/config.rb
event_sourcery-0.23.1 lib/event_sourcery/memory/config.rb
event_sourcery-0.23.0 lib/event_sourcery/memory/config.rb
event_sourcery-0.22.0 lib/event_sourcery/memory/config.rb
event_sourcery-0.21.0 lib/event_sourcery/memory/config.rb
event_sourcery-0.20.0 lib/event_sourcery/memory/config.rb
event_sourcery-0.19.0 lib/event_sourcery/memory/config.rb
event_sourcery-0.18.0 lib/event_sourcery/memory/config.rb
event_sourcery-0.17.0 lib/event_sourcery/memory/config.rb
event_sourcery-0.16.1 lib/event_sourcery/memory/config.rb