Class: ZeroRuby::Configuration
- Inherits:
-
Object
- Object
- ZeroRuby::Configuration
- Defined in:
- lib/zero_ruby/configuration.rb
Overview
Configuration class for ZeroRuby.
Instance Attribute Summary collapse
-
#lmid_store ⇒ Object
LMID (Last Mutation ID) tracking settings The LMID store backend: :active_record or a custom LmidStore instance.
-
#supported_push_version ⇒ Object
The push version supported by this configuration.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
-
#lmid_store_instance ⇒ LmidStore
Get the configured LMID store instance.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
18 19 20 21 |
# File 'lib/zero_ruby/configuration.rb', line 18 def initialize @lmid_store = :active_record @supported_push_version = 1 end |
Instance Attribute Details
#lmid_store ⇒ Object
LMID (Last Mutation ID) tracking settings The LMID store backend: :active_record or a custom LmidStore instance
13 14 15 |
# File 'lib/zero_ruby/configuration.rb', line 13 def lmid_store @lmid_store end |
#supported_push_version ⇒ Object
The push version supported by this configuration
16 17 18 |
# File 'lib/zero_ruby/configuration.rb', line 16 def supported_push_version @supported_push_version end |
Instance Method Details
#lmid_store_instance ⇒ LmidStore
Get the configured LMID store instance
25 26 27 28 29 30 31 32 33 34 |
# File 'lib/zero_ruby/configuration.rb', line 25 def lmid_store_instance case @lmid_store when :active_record LmidStores::ActiveRecordStore.new when LmidStore @lmid_store else raise ArgumentError, "Unknown LMID store: #{@lmid_store.inspect}. Use :active_record or pass a custom LmidStore instance." end end |