Sha256: 6989b0c98d2560450bb71fef4f68f9f35785cd525e6efa6636bdf9fbe0c1fca8

Contents?: true

Size: 461 Bytes

Versions: 8

Compression:

Stored size: 461 Bytes

Contents

# frozen_string_literal: true

module Mihari
  module Notifiers
    class Base
      def self.inherited(child)
        Mihari.notifiers << child
      end

      # @return [true, false]
      def valid?
        raise NotImplementedError, "You must implement #{self.class}##{__method__}"
      end

      def notify(title:, description:, artifacts:)
        raise NotImplementedError, "You must implement #{self.class}##{__method__}"
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
mihari-0.3.0 lib/mihari/notifiers/base.rb
mihari-0.2.5 lib/mihari/notifiers/base.rb
mihari-0.2.4 lib/mihari/notifiers/base.rb
mihari-0.2.3 lib/mihari/notifiers/base.rb
mihari-0.2.2 lib/mihari/notifiers/base.rb
mihari-0.2.1 lib/mihari/notifiers/base.rb
mihari-0.2.0 lib/mihari/notifiers/base.rb
mihari-0.1.0 lib/mihari/notifiers/base.rb