lib/tram/policy/errors.rb in tram-policy-2.1.0 vs lib/tram/policy/errors.rb in tram-policy-2.2.0
- old
+ new
@@ -45,11 +45,11 @@
# @param [Hash<Symbol, Object>] tags The list of tags to filter errors by
# @return [Tram::Policy::Errors]
#
def filter(key = nil, **tags)
list = each_with_object(Set.new) do |error, obj|
- obj << error if error.contain?(key, tags)
+ obj << error if error.contain?(key, **tags)
end
self.class.new(scope: scope, errors: list)
end
# @!method empty?
@@ -93,10 +93,10 @@
return self unless other.is_a?(self.class)
other.each do |err|
key, opts = err.item
opts = yield(opts) if block_given?
- add key, opts.merge(options)
+ add key, **opts.merge(options)
end
self
end