Sha256: 2602634aaf7bb4f6c51989504fef52cc1ca0b6256a97b8fe5f9c36f6e931a758

Contents?: true

Size: 506 Bytes

Versions: 11

Compression:

Stored size: 506 Bytes

Contents

module Janky
  module Notifier
    # Dispatches notifications to multiple notifiers.
    class Multi
      def initialize(notifiers)
        @notifiers = notifiers
      end

      def started(build)
        @notifiers.each do |notifier|
          notifier.started(build) if notifier.respond_to?(:started)
        end
      end

      def completed(build)
        @notifiers.each do |notifier|
          notifier.completed(build) if notifier.respond_to?(:completed)
        end
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
janky-0.10.2 lib/janky/notifier/multi.rb
janky-0.10.0 lib/janky/notifier/multi.rb
janky-0.9.15 lib/janky/notifier/multi.rb
janky-0.9.14 lib/janky/notifier/multi.rb
janky-0.9.14.rc1 lib/janky/notifier/multi.rb
janky-0.9.13 lib/janky/notifier/multi.rb
janky-0.9.12 lib/janky/notifier/multi.rb
janky-0.9.11 lib/janky/notifier/multi.rb
janky-0.9.10 lib/janky/notifier/multi.rb
janky-0.9.9 lib/janky/notifier/multi.rb
janky-0.9.0 lib/janky/notifier/multi.rb