lib/acfs/global.rb in acfs-0.36.0.1.b293 vs lib/acfs/global.rb in acfs-0.37.0

- old
+ new

@@ -66,7 +66,15 @@ block.call resource else resource.__callbacks__ << block end end + + def on(*resources) + resources.each do |resource| + add_callback resource do |ret| + yield(*resources) unless resources.any? { |res| !res.loaded? } + end + end + end end end