Class: StoreArray

Inherits:
ArrayModel show all
Defined in:
lib/volt/models/store_array.rb

Instance Attribute Summary

Attributes inherited from ArrayModel

#parent, #path

Instance Method Summary collapse

Methods inherited from ArrayModel

#+, #<<, #attributes, #inject

Methods included from ModelWrapper

#wrap_value, #wrap_values

Methods inherited from ReactiveArray

#+, #<<, #==, #[]=, #delete_at, #insert, #inspect, #method_missing, #split_scope, #trigger_for_index!, #trigger_on_direct_listeners!, #trigger_size_change!

Methods included from ObjectTracking

#__setup_tracking

Methods included from ReactiveTags

included, #reactive_method_tag

Constructor Details

#initialize(tasks = nil, array = [], parent = nil, path = nil) ⇒ StoreArray

Returns a new instance of StoreArray.



2
3
4
5
6
# File 'lib/volt/models/store_array.rb', line 2

def initialize(tasks=nil, array=[], parent=nil, path=nil)
  @tasks = tasks

  super(array, parent, path)
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class ReactiveArray

Instance Method Details

#new_array_model(*args) ⇒ Object



12
13
14
# File 'lib/volt/models/store_array.rb', line 12

def new_array_model(*args)
  StoreArray.new(@tasks, *args)
end

#new_model(*args) ⇒ Object



8
9
10
# File 'lib/volt/models/store_array.rb', line 8

def new_model(*args)
  Store.new(@tasks, *args)
end