Sha256: 5804aeee33d06bc90446729311af42bac6d2aad90cf80652498a61b3386f9d79
Contents?: true
Size: 778 Bytes
Versions: 12
Compression:
Stored size: 778 Bytes
Contents
# encoding: utf-8 require 'dynamoid/criteria/chain' module Dynamoid # Allows classes to be queried by where, all, first, and each and return criteria chains. module Criteria extend ActiveSupport::Concern module ClassMethods [:where, :all, :first, :each, :eval_limit, :start, :scan_index_forward].each do |meth| # Return a criteria chain in response to a method that will begin or end a chain. For more information, # see Dynamoid::Criteria::Chain. # # @since 0.2.0 define_method(meth) do |*args| chain = Dynamoid::Criteria::Chain.new(self) if args chain.send(meth, *args) else chain.send(meth) end end end end end end
Version data entries
12 entries across 12 versions & 3 rubygems