Class: Cuprum::Collections::Associations::HasMany
- Inherits:
-
Cuprum::Collections::Association
- Object
- Relation
- Resource
- Cuprum::Collections::Association
- Cuprum::Collections::Associations::HasMany
- Defined in:
- lib/cuprum/collections/associations/has_many.rb
Overview
Object representing a has_many association.
Instance Attribute Summary
Attributes inherited from Cuprum::Collections::Association
Attributes inherited from Relation
Attributes included from Relation::Parameters
#name, #plural_name, #qualified_name, #singular_name
Instance Method Summary collapse
-
#initialize(entity_class: nil, name: nil, qualified_name: nil, singular_name: nil, **options) ⇒ HasMany
constructor
A new instance of HasMany.
Methods inherited from Cuprum::Collections::Association
#association_class, #association_name, #build_entities_query, #build_keys_query, #foreign_key_name, #inverse_class, #inverse_key_name, #inverse_name, #map_entities_to_keys, #primary_key_query?, #query_key_name, #singular_inverse_name, #with_inverse
Methods inherited from Resource
#resource_class, #resource_name, #singular_resource_name
Methods included from Relation::PrimaryKeys
#primary_key_name, #primary_key_type
Methods included from Relation::Disambiguation
disambiguate_keyword, #disambiguate_keyword, resolve_parameters, #resolve_parameters
Methods included from Relation::Cardinality
Methods included from Relation::Parameters
#entity_class, resolve_parameters, #resolve_parameters
Constructor Details
#initialize(entity_class: nil, name: nil, qualified_name: nil, singular_name: nil, **options) ⇒ HasMany
Returns a new instance of HasMany.
10 11 12 13 14 15 |
# File 'lib/cuprum/collections/associations/has_many.rb', line 10 def initialize(**params) params.delete(:plural) params.delete(:singular) super(**params, singular: false) end |