Sha256: 188397b62978cd431c748884cba88375a2b60e1c12ac004b5735089adde70608
Contents?: true
Size: 592 Bytes
Versions: 13
Compression:
Stored size: 592 Bytes
Contents
require 'volt/models/model_wrapper' class ArrayModel < ReactiveArray include ModelWrapper def initialize(array=[], parent=nil, path=nil) @parent = parent @path = path array = wrap_values(array) super(array) end def attributes self end # Make sure it gets wrapped def <<(*args) args = wrap_values(args) super(*args) end # Make sure it gets wrapped def inject(*args) args = wrap_values(args) super(*args) end # Make sure it gets wrapped def +(*args) args = wrap_values(args) super(*args) end end
Version data entries
13 entries across 13 versions & 1 rubygems