module Alephant::Sequencer
Constants
- VERSION
Public Class Methods
create(table_name, opts = {})
click to toggle source
# File lib/alephant/sequencer.rb, line 10 def self.create(table_name, opts = {}) defaults = { jsonpath: nil, keep_all: true, config: {} } opts = defaults.merge(opts).tap do |opts| opts[:cache] = cache(opts[:config]) end @@sequence_tables[table_name] ||= SequenceTable.new(table_name) Sequencer.new(@@sequence_tables[table_name], opts) end
Private Class Methods
cache(config)
click to toggle source
# File lib/alephant/sequencer.rb, line 27 def self.cache(config) @cache ||= SequenceCache.new(config) end