Class: Sandthorn::Configuration

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/sandthorn.rb

Instance Method Summary collapse

Constructor Details

#initialize {|_self| ... } ⇒ Configuration

Returns a new instance of Configuration.

Yields:

  • (_self)

Yield Parameters:



78
79
80
# File 'lib/sandthorn.rb', line 78

def initialize
  yield(self) if block_given?
end

Instance Method Details

#event_store=(store) ⇒ Object Also known as: event_stores=



86
87
88
# File 'lib/sandthorn.rb', line 86

def event_store=(store)
  @event_stores = EventStores.new(store)
end

#event_storesObject



82
83
84
# File 'lib/sandthorn.rb', line 82

def event_stores
  @event_stores ||= EventStores.new
end

#map_types=(data) ⇒ Object



90
91
92
# File 'lib/sandthorn.rb', line 90

def map_types= data
  @event_stores.map_types data
end

#snapshot_storeObject



94
95
96
# File 'lib/sandthorn.rb', line 94

def snapshot_store
  @snapshot_store ||= SnapshotStore.new
end

#snapshot_types=(aggregate_types) ⇒ Object



98
99
100
101
102
# File 'lib/sandthorn.rb', line 98

def snapshot_types= aggregate_types
  aggregate_types.each do |aggregate_type|
    aggregate_type.snapshot(true)
  end
end