Class: ArSync::Collection::Tree

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, #sync_send_event, #to_a

Constructor Details

#initializeTree

Returns a new instance of Tree.



36
37
38
39
40
# File 'lib/ar_sync/collection.rb', line 36

def initialize(*)
  super
  @field = ArSync::CollectionField.new @name, limit: @limit, order: @order
  self.class._sync_children_info[[@klass, @name]] = @field
end

Class Method Details

._sync_child_info(key) ⇒ Object



48
49
50
# File 'lib/ar_sync/collection.rb', line 48

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

._sync_children_infoObject



44
45
46
# File 'lib/ar_sync/collection.rb', line 44

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

Instance Method Details

#_sync_notify_parentObject



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

def _sync_notify_parent(*); end