Class: EntitySchema::Fields::Builders::BelongsTo
- Inherits:
-
Object
- Object
- EntitySchema::Fields::Builders::BelongsTo
- Includes:
- Singleton
- Defined in:
- lib/entity_schema/fields/builders/belongs_to.rb
Overview
Build two fields: for foreign key property and for related object
link foreign key with his object for interaction
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.call(options) ⇒ Object
24 25 26 |
# File 'lib/entity_schema/fields/builders/belongs_to.rb', line 24 def self.call() instance.call() end |
Instance Method Details
#call(options) ⇒ Object
17 18 19 20 21 22 |
# File 'lib/entity_schema/fields/builders/belongs_to.rb', line 17 def call() fk = create_fk() object = create_object() create_observer(fk, object, ) [fk, object] end |