lib/resugan/object.rb in resugan-0.1.12 vs lib/resugan/object.rb in resugan-0.1.13

- old
+ new

@@ -25,6 +25,12 @@ def _listener(event, options = {}, &block) Resugan::Kernel.register_with_namespace(options[:namespace], event, options[:id], ->(params) { block.call(params) }) end + + def _listener!(event, options = {}, &block) + Resugan::Kernel.register_with_namespace(options[:namespace], event, options[:id] || caller[0], ->(params) { + block.call(params) + }) + end end