Sha256: fbd90e9a3b7928011ad4f818a140d796e3f447c1ef90b7026355967f543a7aa1
Contents?: true
Size: 503 Bytes
Versions: 11
Compression:
Stored size: 503 Bytes
Contents
# encoding: utf-8 require 'attr_enumerable/attr_enumerable_helper' # AttrEnumerable module AttrEnumerable private def delete_attr(attribute, method_name, *args, &block) del_target = args.first return [] if collection.empty? super(method_name, *args) unless include_attr?(collection.first, attribute) del_targets = collection.select { |v|v.send(attribute) == del_target } del_targets.each { |each_target|collection.delete(each_target) } del_targets end end
Version data entries
11 entries across 11 versions & 1 rubygems