Module: TableSync
- Defined in:
- lib/table_sync.rb,
lib/table_sync/utils.rb,
lib/table_sync/errors.rb,
lib/table_sync/version.rb,
lib/table_sync/receiving.rb,
lib/table_sync/publishing.rb
Defined Under Namespace
Modules: Instrument, InstrumentAdapter, NamingResolver, ORMAdapter, Publishing, Receiving, Setup, Utils Classes: DataError, DestroyError, Event, EventError, InterfaceError, NoCallableError, NoPrimaryKeyError, UpsertError, WrongOptionValue
Constant Summary collapse
- Error =
Class.new(StandardError)
- NoObjectsForSyncError =
Class.new(Error)
- InvalidConfig =
Class.new(Error)
- UndefinedEvent =
Class.new(Error)
- ORMNotSupported =
Class.new(Error)
- VERSION =
"6.6.1"
Class Attribute Summary collapse
-
.batch_publishing_job_class_callable ⇒ Object
Returns the value of attribute batch_publishing_job_class_callable.
-
.exchange_name ⇒ Object
Returns the value of attribute exchange_name.
-
.headers_callable ⇒ Object
Returns the value of attribute headers_callable.
-
.notifier ⇒ Object
Returns the value of attribute notifier.
-
.notify ⇒ Object
Returns the value of attribute notify.
-
.orm ⇒ Object
Returns the value of attribute orm.
-
.publishing_adapter ⇒ Object
readonly
Returns the value of attribute publishing_adapter.
-
.raise_on_empty_message ⇒ Object
Returns the value of attribute raise_on_empty_message.
-
.receiving_model ⇒ Object
readonly
Returns the value of attribute receiving_model.
-
.routing_key_callable ⇒ Object
Returns the value of attribute routing_key_callable.
-
.setup ⇒ Object
readonly
Returns the value of attribute setup.
-
.single_publishing_job_class_callable ⇒ Object
Returns the value of attribute single_publishing_job_class_callable.
Class Method Summary collapse
Class Attribute Details
.batch_publishing_job_class_callable ⇒ Object
Returns the value of attribute batch_publishing_job_class_callable.
36 37 38 |
# File 'lib/table_sync.rb', line 36 def batch_publishing_job_class_callable @batch_publishing_job_class_callable end |
.exchange_name ⇒ Object
Returns the value of attribute exchange_name.
38 39 40 |
# File 'lib/table_sync.rb', line 38 def exchange_name @exchange_name end |
.headers_callable ⇒ Object
Returns the value of attribute headers_callable.
39 40 41 |
# File 'lib/table_sync.rb', line 39 def headers_callable @headers_callable end |
.notifier ⇒ Object
Returns the value of attribute notifier.
46 47 48 |
# File 'lib/table_sync.rb', line 46 def notifier @notifier end |
.notify ⇒ Object
Returns the value of attribute notify.
40 41 42 |
# File 'lib/table_sync.rb', line 40 def notify @notify end |
.orm ⇒ Object
Returns the value of attribute orm.
42 43 44 |
# File 'lib/table_sync.rb', line 42 def orm @orm end |
.publishing_adapter ⇒ Object (readonly)
Returns the value of attribute publishing_adapter.
43 44 45 |
# File 'lib/table_sync.rb', line 43 def publishing_adapter @publishing_adapter end |
.raise_on_empty_message ⇒ Object
Returns the value of attribute raise_on_empty_message.
34 35 36 |
# File 'lib/table_sync.rb', line 34 def @raise_on_empty_message end |
.receiving_model ⇒ Object (readonly)
Returns the value of attribute receiving_model.
44 45 46 |
# File 'lib/table_sync.rb', line 44 def receiving_model @receiving_model end |
.routing_key_callable ⇒ Object
Returns the value of attribute routing_key_callable.
37 38 39 |
# File 'lib/table_sync.rb', line 37 def routing_key_callable @routing_key_callable end |
.setup ⇒ Object (readonly)
Returns the value of attribute setup.
45 46 47 |
# File 'lib/table_sync.rb', line 45 def setup @setup end |
.single_publishing_job_class_callable ⇒ Object
Returns the value of attribute single_publishing_job_class_callable.
35 36 37 |
# File 'lib/table_sync.rb', line 35 def single_publishing_job_class_callable @single_publishing_job_class_callable end |
Class Method Details
.notify? ⇒ Boolean
81 82 83 |
# File 'lib/table_sync.rb', line 81 def notify? !!notify end |
.sync(object_class, **options) ⇒ Object
48 49 50 51 52 53 54 55 56 |
# File 'lib/table_sync.rb', line 48 def sync(object_class, **) setup.new( object_class:, on: [:on], if_condition: [:if], unless_condition: [:unless], debounce_time: [:debounce_time], ).register_callbacks end |