Class: Cuprum::Rails::Commands::FindMatching
- Inherits:
-
Cuprum::Rails::Command
- Object
- Collections::Command
- Cuprum::Rails::Command
- Cuprum::Rails::Commands::FindMatching
- Includes:
- Collections::Commands::AbstractFindMatching
- Defined in:
- lib/cuprum/rails/commands/find_matching.rb
Overview
Command for querying filtered, ordered data from a Rails collection.
Instance Attribute Summary
Attributes inherited from Cuprum::Rails::Command
#collection_name, #member_name, #options, #record_class
Instance Method Summary collapse
-
#call(envelope: false, limit: nil, offset: nil, order: nil, scope: nil, where: nil) { ... } ⇒ Object
Queries the collection for records matching the given conditions.
Methods inherited from Cuprum::Rails::Command
#initialize, #primary_key_name, #primary_key_type, subclass
Constructor Details
This class inherits a constructor from Cuprum::Rails::Command
Instance Method Details
#call(limit: nil, offset: nil, order: nil, &block) ⇒ Cuprum::Result<Enumerator> #call(limit: nil, offset: nil, order: nil, &block) ⇒ Cuprum::Result<Hash{String, Array<ActiveRecord::Base>}>
Queries the collection for records matching the given conditions.
100 101 102 103 104 105 106 107 108 109 110 111 112 113 |
# File 'lib/cuprum/rails/commands/find_matching.rb', line 100 validate_parameters :call do keyword :envelope, Stannum::Constraints::Boolean.new, default: true keyword :limit, Integer, optional: true keyword :offset, Integer, optional: true keyword :order, Cuprum::Collections::Constraints::Ordering.new, optional: true keyword :scope, Cuprum::Rails::Query, optional: true keyword :where, Object, optional: true end |