lib/eco/api/session/config.rb in eco-helpers-2.6.0 vs lib/eco/api/session/config.rb in eco-helpers-2.6.1
- old
+ new
@@ -365,13 +365,13 @@
@policies
end
end
# @return [Eco::API::Session::Batch::Policies]
- def batch_policies
+ def batch_policies(&block)
@batch_policies = self["batch_policies"] ||= Eco::API::Session::Batch::Policies.new("batch_policy")
if block_given?
- yield(@batch_policies)
+ @batch_policies.evaluate(@batch_policies, &block)
self
else
@batch_policies
end
end