Method: ContextIO::API::ResourceCollection#where
- Defined in:
- lib/contextio/api/resource_collection.rb
#where(constraints) ⇒ Object
Specify one or more constraints for limiting resources in this collection. See individual classes in the Context.IO docs for the list of valid constraints. Not all collections have valid where constraints at all.
This can be chained at need and doesn't actually cause the API to get
hit until some iterator is called like #each.
91 92 93 |
# File 'lib/contextio/api/resource_collection.rb', line 91 def where(constraints) self.class.new(api, associations_hash.merge(where: where_constraints.merge(constraints))) end |