Method: Synced::Synchronizer#initialize
- Defined in:
- lib/synced/synchronizer.rb
#initialize(model_class, options = {}) ⇒ Synchronizer
Initializes a new Synchronizer
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/synced/synchronizer.rb', line 40 def initialize(model_class, = {}) @model_class = model_class @scope = [:scope] @id_key = [:id_key] @synced_all_at_key = [:synced_all_at_key] @data_key = [:data_key] @remove = [:remove] @only_updated = [:only_updated] @include = [:include] @local_attributes = [:local_attributes] @api = [:api] @mapper = [:mapper].respond_to?(:call) ? [:mapper].call : [:mapper] @fields = [:fields] @remove = [:remove] @associations = Array([:associations]) @remote_objects = Array([:remote]) unless [:remote].nil? @request_performed = false end |