class MR::FakeRecord::HasManyAssociation

Public Instance Methods

read() click to toggle source
# File lib/mr/fake_record/associations.rb, line 223
def read
  @owner.instance_variable_get(@ivar_name) ||
  @owner.instance_variable_set(@ivar_name, [])
end
write(value) click to toggle source
# File lib/mr/fake_record/associations.rb, line 228
def write(value)
  @owner.instance_variable_set(@ivar_name, [*value].compact)
end