class MR::FakeRecord::HasOneAssociation
Constants
- NULL_RECORD
- NullClass
- NullRecord
Public Instance Methods
read()
click to toggle source
# File lib/mr/fake_record/associations.rb, line 203 def read @owner.instance_variable_get(@ivar_name) end
write(value)
click to toggle source
# File lib/mr/fake_record/associations.rb, line 207 def write(value) @owner.instance_variable_set(@ivar_name, value) write_attributes(value || NULL_RECORD) value end
Private Instance Methods
write_attributes(associated_fake_record)
click to toggle source
# File lib/mr/fake_record/associations.rb, line 215 def write_attributes(associated_fake_record); end