Sha256: 116d0ec2fa0c2fcbc94f6a4a048e39697caf84a7e993e295c913c30ce0f06c24

Contents?: true

Size: 736 Bytes

Versions: 1

Compression:

Stored size: 736 Bytes

Contents

module ActiveNotifier
  module NotifierAdapters
    class Abstract < ActiveAdapter::Abstract
      # Notify message
      #
      # @abstract Implement through setting a real adapter, like :dingtalk
      # @param token [String] Channel webhook token
      # @param type [Symbol] Message type
      # @param message [String] Message body
      # @param options [Hash] Adapter message options, some adapters require some another options
      # @raise [AdapterOptionsInvalidError]
      # @raise [AdapterTypeInvalidError]
      # @raise [MessageBlankError]
      # @see ActiveNotitifier::exec for usage
      def notify(token, type, message, **options)
        adapter.notify(token, type, message, **options)
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
active_notifier-0.4.0 lib/active_notifier/notifier_adapters/abstract.rb