Module: Disposable::Twin::Sync::Writeable

Included in:
Disposable::Twin::Sync
Defined in:
lib/disposable/twin/sync.rb

Overview

Excludes :virtual and :writeable: false properties from #sync in this twin.

Instance Method Summary collapse

Instance Method Details

#sync_options(options) ⇒ Object



94
95
96
97
98
99
# File 'lib/disposable/twin/sync.rb', line 94

def sync_options(options)
  options = super

  protected_fields = schema.each.find_all { |d| d[:writeable] == false }.collect { |d| d.name }
  options.exclude!(protected_fields)
end