Method: ArrayModel#buffer

Defined in:
lib/volt/models/array_model.rb

#bufferObject



126
127
128
129
130
131
132
133
134
# File 'lib/volt/models/array_model.rb', line 126

def buffer
  model_path = options[:path] + [:[]]
  model_klass = class_at_path(model_path)

  new_options = options.merge(path: model_path, save_to: self).reject {|k,_| k.to_sym == :persistor }
  model = model_klass.new({}, new_options)

  return ReactiveValue.new(model)
end