class ROM::Commands::Lazy::Delete
Lazy
command wrapper for delete commands
@api public
Public Instance Methods
call(*args)
click to toggle source
Execute a lazy delete command
@return [Hash, Array<Hash>]
@api public
# File lib/rom/commands/lazy/delete.rb, line 17 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