Sha256: 2399c2aed774ada6afce69a0e924aaf1262ab46b6b734bdce9c9574195c8412d

Contents?: true

Size: 598 Bytes

Versions: 3

Compression:

Stored size: 598 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, detail = nil)
          listeners.each { |changelog| changelog.add_bad_line(message, detail) }
        end

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

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
danger-changelog-0.7.1 lib/changelog/parsers/base.rb
danger-changelog-0.7.0 lib/changelog/parsers/base.rb
danger-changelog-0.6.1 lib/changelog/parsers/base.rb