Class: ForestAdminDatasourceToolkit::Schema::Relations::PolymorphicManyToOneSchema
- Inherits:
-
Object
- Object
- ForestAdminDatasourceToolkit::Schema::Relations::PolymorphicManyToOneSchema
- Defined in:
- lib/forest_admin_datasource_toolkit/schema/relations/polymorphic_many_to_one_schema.rb
Instance Attribute Summary collapse
-
#foreign_collections ⇒ Object
readonly
Returns the value of attribute foreign_collections.
-
#foreign_key ⇒ Object
readonly
Returns the value of attribute foreign_key.
-
#foreign_key_target ⇒ Object
readonly
Returns the value of attribute foreign_key_target.
-
#foreign_key_targets ⇒ Object
readonly
Returns the value of attribute foreign_key_targets.
-
#foreign_key_type_field ⇒ Object
readonly
Returns the value of attribute foreign_key_type_field.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(foreign_key_type_field:, foreign_key:, foreign_key_targets:, foreign_collections:) ⇒ PolymorphicManyToOneSchema
constructor
A new instance of PolymorphicManyToOneSchema.
Constructor Details
#initialize(foreign_key_type_field:, foreign_key:, foreign_key_targets:, foreign_collections:) ⇒ PolymorphicManyToOneSchema
Returns a new instance of PolymorphicManyToOneSchema.
8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/forest_admin_datasource_toolkit/schema/relations/polymorphic_many_to_one_schema.rb', line 8 def initialize( foreign_key_type_field:, foreign_key:, foreign_key_targets:, foreign_collections: ) @foreign_key = foreign_key @foreign_key_targets = foreign_key_targets @foreign_key_type_field = foreign_key_type_field @foreign_collections = foreign_collections @type = 'PolymorphicManyToOne' end |
Instance Attribute Details
#foreign_collections ⇒ Object (readonly)
Returns the value of attribute foreign_collections.
5 6 7 |
# File 'lib/forest_admin_datasource_toolkit/schema/relations/polymorphic_many_to_one_schema.rb', line 5 def foreign_collections @foreign_collections end |
#foreign_key ⇒ Object (readonly)
Returns the value of attribute foreign_key.
5 6 7 |
# File 'lib/forest_admin_datasource_toolkit/schema/relations/polymorphic_many_to_one_schema.rb', line 5 def foreign_key @foreign_key end |
#foreign_key_target ⇒ Object (readonly)
Returns the value of attribute foreign_key_target.
5 6 7 |
# File 'lib/forest_admin_datasource_toolkit/schema/relations/polymorphic_many_to_one_schema.rb', line 5 def foreign_key_target @foreign_key_target end |
#foreign_key_targets ⇒ Object (readonly)
Returns the value of attribute foreign_key_targets.
5 6 7 |
# File 'lib/forest_admin_datasource_toolkit/schema/relations/polymorphic_many_to_one_schema.rb', line 5 def foreign_key_targets @foreign_key_targets end |
#foreign_key_type_field ⇒ Object (readonly)
Returns the value of attribute foreign_key_type_field.
5 6 7 |
# File 'lib/forest_admin_datasource_toolkit/schema/relations/polymorphic_many_to_one_schema.rb', line 5 def foreign_key_type_field @foreign_key_type_field end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
5 6 7 |
# File 'lib/forest_admin_datasource_toolkit/schema/relations/polymorphic_many_to_one_schema.rb', line 5 def type @type end |