Class: SandthornSequelProjection::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/sandthorn_sequel_projection.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of Configuration.

Yields:

  • (_self)

Yield Parameters:



53
54
55
# File 'lib/sandthorn_sequel_projection.rb', line 53

def initialize
  yield(self) if block_given?
end

Instance Attribute Details

#batch_sizeObject

Returns the value of attribute batch_size.



51
52
53
# File 'lib/sandthorn_sequel_projection.rb', line 51

def batch_size
  @batch_size
end

#db_connectionObject

Returns the value of attribute db_connection.



51
52
53
# File 'lib/sandthorn_sequel_projection.rb', line 51

def db_connection
  @db_connection
end

#event_storesObject

Returns the value of attribute event_stores.



51
52
53
# File 'lib/sandthorn_sequel_projection.rb', line 51

def event_stores
  @event_stores
end

#projections_folderObject

Returns the value of attribute projections_folder.



51
52
53
# File 'lib/sandthorn_sequel_projection.rb', line 51

def projections_folder
  @projections_folder
end

Class Method Details

.defaultObject



61
62
63
64
65
# File 'lib/sandthorn_sequel_projection.rb', line 61

def self.default
  self.new do |c|
    c.batch_size = 40
  end
end

Instance Method Details

#event_store=(store) ⇒ Object



57
58
59
# File 'lib/sandthorn_sequel_projection.rb', line 57

def event_store=(store)
  @event_stores = { default: store }
end