Sha256: f51144d638d742e3ec06f929e94f6bb059ce6d61e5be032b4d280b9f7fc7d16c

Contents?: true

Size: 299 Bytes

Versions: 16

Compression:

Stored size: 299 Bytes

Contents

module Deferring
  class DeferredCallbackListener < Struct.new(:event_name, :callee, :callback)

    [:before_link, :before_unlink, :after_link, :after_unlink].each do |event_name|
      define_method(event_name) do |record|
        callee.public_send(callback, record)
      end
    end

  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
deferring-0.2.1 lib/deferring/deferred_callback_listener.rb
deferring-0.2.0 lib/deferring/deferred_callback_listener.rb
deferring-0.1.5 lib/deferring/deferred_callback_listener.rb
deferring-0.1.4 lib/deferring/deferred_callback_listener.rb
deferring-0.1.3 lib/deferring/deferred_callback_listener.rb
deferring-0.1.2 lib/deferring/deferred_callback_listener.rb
deferring-0.1.1 lib/deferring/deferred_callback_listener.rb
deferring-0.1.0 lib/deferring/deferred_callback_listener.rb
deferring-0.0.10 lib/deferring/deferred_callback_listener.rb
deferring-0.0.9 lib/deferring/deferred_callback_listener.rb
deferring-0.0.8 lib/deferring/deferred_callback_listener.rb
deferring-0.0.7 lib/deferring/deferred_callback_listener.rb
deferring-0.0.6 lib/deferring/deferred_callback_listener.rb
deferring-0.0.5 lib/deferring/deferred_callback_listener.rb
deferring-0.0.4 lib/deferring/deferred_callback_listener.rb
deferring-0.0.3 lib/deferring/deferred_callback_listener.rb