Sha256: 8a0b0057921dc745777efb6b8d93345ea27ce8a9033c32d401bed1f9552ee9dc
Contents?: true
Size: 952 Bytes
Versions: 9
Compression:
Stored size: 952 Bytes
Contents
class Syncano # Class representing objects batch requests queued for processing class BatchQueueElement # Constructor for Syncano::BatchQueueElement # @param [Syncano::QueryBuilder, Syncano::Resources::Base] resource def initialize(resource) super() self.resource = resource.dup end # Overwritten method_missing used for preparing execution of proper batch method on the resource object # @param [Symbol] sym # @param [Array] args # @param [Proc] block # @return [Syncano::BatchQueueElement] def method_missing(sym, *args, &block) self.method_name = 'batch_' + sym.to_s self.args = args self.block = block self end # Executes batch method on the resource object def perform!(batch_client) args.unshift(batch_client) resource.send(method_name, *args, &block) end private attr_accessor :resource, :method_name, :args, :block end end
Version data entries
9 entries across 9 versions & 1 rubygems