Class: Cuprum::Collections::Commands::Associations::FindMany
- Inherits:
-
Cuprum::Command
- Object
- Cuprum::Command
- Cuprum::Collections::Commands::Associations::FindMany
- Defined in:
- lib/cuprum/collections/commands/associations/find_many.rb
Overview
Command for querying entities by association.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#association ⇒ Cuprum::Collections::Association
readonly
The association to query.
-
#repository ⇒ Cuprum::Collections::Repository
readonly
The repository to query from.
-
#resource ⇒ Cuprum::Collections::Resource
readonly
The base resource for the association.
Instance Method Summary collapse
- #call(**params) ⇒ Object
-
#initialize(association:, repository:, resource:) ⇒ FindMany
constructor
A new instance of FindMany.
Constructor Details
#initialize(association:, repository:, resource:) ⇒ FindMany
Returns a new instance of FindMany.
56 57 58 59 60 61 62 |
# File 'lib/cuprum/collections/commands/associations/find_many.rb', line 56 def initialize(association:, repository:, resource:) super() @association = association @repository = repository @resource = resource end |
Instance Attribute Details
#association ⇒ Cuprum::Collections::Association (readonly)
Returns the association to query.
65 66 67 |
# File 'lib/cuprum/collections/commands/associations/find_many.rb', line 65 def association @association end |
#repository ⇒ Cuprum::Collections::Repository (readonly)
Returns the repository to query from.
68 69 70 |
# File 'lib/cuprum/collections/commands/associations/find_many.rb', line 68 def repository @repository end |
#resource ⇒ Cuprum::Collections::Resource (readonly)
Returns the base resource for the association.
72 73 74 |
# File 'lib/cuprum/collections/commands/associations/find_many.rb', line 72 def resource @resource end |
Instance Method Details
#call(key: ) ⇒ Object, ... #call(keys: ) ⇒ Array<Object> #call(entity: ) ⇒ Object, ... #call(entities: ) ⇒ Array<Object>
|
# File 'lib/cuprum/collections/commands/associations/find_many.rb', line 11
|