Sha256: 60bf51fa784b7fb2f255d69948381a5db410d8234427dfdf7d83e8626c14eb67

Contents?: true

Size: 340 Bytes

Versions: 24

Compression:

Stored size: 340 Bytes

Contents

module DeepTest
  class ListenerList
    attr_reader :listeners

    def initialize(listeners)
      @listeners = listeners
    end

    NullWorkerListener.instance_methods(false).each do |event|
      eval <<-end_src
        def #{event}(*args)
          @listeners.each {|l| l.#{event}(*args)}
        end
      end_src
    end
  end
end

Version data entries

24 entries across 24 versions & 4 rubygems

Version Path
jason-o-matic-deep_test-1.2.2.1 lib/deep_test/listener_list.rb
jason-o-matic-deep_test-1.2.2.10 lib/deep_test/listener_list.rb
jason-o-matic-deep_test-1.2.2.11 lib/deep_test/listener_list.rb
jason-o-matic-deep_test-1.2.2.12 lib/deep_test/listener_list.rb
jason-o-matic-deep_test-1.2.2.13 lib/deep_test/listener_list.rb
jason-o-matic-deep_test-1.2.2.14 lib/deep_test/listener_list.rb
jason-o-matic-deep_test-1.2.2.2 lib/deep_test/listener_list.rb
jason-o-matic-deep_test-1.2.2.3 lib/deep_test/listener_list.rb
jason-o-matic-deep_test-1.2.2.4 lib/deep_test/listener_list.rb
jason-o-matic-deep_test-1.2.2.5 lib/deep_test/listener_list.rb
jason-o-matic-deep_test-1.2.2.6 lib/deep_test/listener_list.rb
jason-o-matic-deep_test-1.2.2.7 lib/deep_test/listener_list.rb
jason-o-matic-deep_test-1.2.2.8 lib/deep_test/listener_list.rb
jason-o-matic-deep_test-1.2.2.9 lib/deep_test/listener_list.rb
jperkins-deep_test-1.2.2 lib/deep_test/listener_list.rb
jason-o-matic-deep_test-1.2.2.15 lib/deep_test/listener_list.rb
jstorimer-deep-test-1.4.0 lib/deep_test/listener_list.rb
jstorimer-deep-test-1.3.0 lib/deep_test/listener_list.rb
jstorimer-deep-test-1.2.0 lib/deep_test/listener_list.rb
jstorimer-deep-test-1.1.0 lib/deep_test/listener_list.rb