Class: ActiveEntity::Associations::Embeds::EmbeddedInAssociation

Inherits:
SingularAssociation show all
Defined in:
lib/active_entity/associations/embeds/embedded_in_association.rb

Overview

Active Entity Belongs To Association

Instance Attribute Summary

Attributes inherited from Association

#owner, #reflection, #target

Instance Method Summary collapse

Methods inherited from SingularAssociation

#build, #reader, #writer

Methods inherited from Association

#extensions, #initialize, #initialize_attributes, #inversed_from, #klass, #loaded?, #marshal_dump, #marshal_load, #remove_inverse_instance, #set_inverse_instance

Constructor Details

This class inherits a constructor from ActiveEntity::Associations::Embeds::Association

Instance Method Details

#default(&block) ⇒ Object

:nodoc:



8
9
10
# File 'lib/active_entity/associations/embeds/embedded_in_association.rb', line 8

def default(&block)
  writer(owner.instance_exec(&block)) if reader.nil?
end