Sha256: 1564aa913e72bfbd682696c088742b7d977059d1b0acd27011f18ac26650547c
Contents?: true
Size: 863 Bytes
Versions: 10
Compression:
Stored size: 863 Bytes
Contents
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
10 entries across 10 versions & 1 rubygems