lib/volt/models/model_wrapper.rb
def wrap_value(value, lookup)
    if value.cur.is_a?(Array)
      value = new_array_model(value, @options.merge(parent: self, path: path + lookup))
    elsif value.cur.is_a?(Hash)
      value = new_model(value, @options.merge(parent: self, path: path + lookup))
    end

    return value
  end
# For cretain values, we wrap them to make the behave as a
# model.
For cretain values, we wrap them to make the behave as a
model.
For cretain values we wrap them to make the behave as a model .
def wrap_value(value, lookup)
    if value.cur.is_a?(Array)
      value = new_array_model(value, @options.merge(parent: self, path: path + lookup))
    elsif value.cur.is_a?(Hash)
      value = new_model(value, @options.merge(parent: self, path: path + lookup))
    end
    return value
  end
def wrap_value ( value , lookup ) if value . cur . is_a? ( Array ) value = new_array_model ( value , @options . merge ( parent : self , path : path + lookup ) ) elsif value . cur . is_a? ( Hash ) value = new_model ( value , @options . merge ( parent : self , path : path + lookup ) ) end return value end
For cretain values, we wrap them to make the behave as a
model.
For cretain values we wrap them to make the behave as a model .
value
lookup