Sha256: 3771e4e030ae608abedae0d43e0f33ac3acdcc2132eb7271cd91a5082caba5c8
Contents?: true
Size: 894 Bytes
Versions: 16
Compression:
Stored size: 894 Bytes
Contents
# frozen_string_literal: true module ROM module Commands class Lazy # Lazy command wrapper for delete commands # # @api public class Delete < Lazy # Execute a lazy delete command # # @see Commands::Delete#call # # @return [Hash, Array<Hash>] # # @api public def call(*args) first = args.first last = args.last size = args.size if size > 1 && last.is_a?(Array) raise NotImplementedError else input = evaluator.call(first) if input.is_a?(Array) input.map do |item| command_proc[command, *(size > 1 ? [last, item] : [input])].call end else command_proc[command, input].call end end end end end end end
Version data entries
16 entries across 16 versions & 2 rubygems