Class: ArSync::Collection::Graph

Inherits:
ArSync::Collection show all
Defined in:
lib/ar_sync/collection.rb

Instance Attribute Summary

Attributes inherited from ArSync::Collection

#klass, #limit, #name, #order

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from ArSync::Collection

defined_collections, find, #initialize, #sync_send_event, #to_a

Constructor Details

This class inherits a constructor from ArSync::Collection

Class Method Details

._sync_child_info(key) ⇒ Object



68
69
70
# File 'lib/ar_sync/collection.rb', line 68

def self._sync_child_info(key)
  _sync_children_info[key]
end

._sync_children_infoObject



64
65
66
# File 'lib/ar_sync/collection.rb', line 64

def self._sync_children_info
  @sync_children_info ||= {}
end

Instance Method Details

#_sync_notify_child_added(child, _name, to_user, _owned) ⇒ Object



56
57
58
# File 'lib/ar_sync/collection.rb', line 56

def _sync_notify_child_added(child, _name, to_user, _owned)
  ArSync.sync_graph_send to: self, action: :add, model: child, path: :collection, to_user: to_user
end

#_sync_notify_child_changed(_child, _name, _to_user, _owned) ⇒ Object



54
# File 'lib/ar_sync/collection.rb', line 54

def _sync_notify_child_changed(_child, _name, _to_user, _owned); end

#_sync_notify_child_removed(child, _name, to_user, _owned) ⇒ Object



60
61
62
# File 'lib/ar_sync/collection.rb', line 60

def _sync_notify_child_removed(child, _name, to_user, _owned)
  ArSync.sync_graph_send to: self, action: :remove, model: child, path: :collection, to_user: to_user
end