Sha256: 78093e006a19a85d04336ea543e2a0c51c4fd592c0748d5c29492e31c2bfdff0

Contents?: true

Size: 576 Bytes

Versions: 2

Compression:

Stored size: 576 Bytes

Contents

module Danger
  module Changelog
    module Parsers
      class Base
        def initialize(listeners = [])
          @listeners = listeners
        end

        attr_reader :listeners

        def add_listener(changelog)
          listeners << changelog
        end

        private

        def notify_of_bad_line(message)
          listeners.each { |changelog| changelog.add_bad_line(message) }
        end

        def notify_of_global_failure(message)
          listeners.each { |changelog| changelog.add_global_failure(message) }
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
danger-changelog-0.6.0 lib/changelog/parsers/base.rb
danger-changelog-0.5.0 lib/changelog/parsers/base.rb