Sha256: 75284962a0b8a0461089326b157a56a334a0748a8b701c9de1ba3a140ba78744
Contents?: true
Size: 590 Bytes
Versions: 4
Compression:
Stored size: 590 Bytes
Contents
module SolidusWebhooks class Configuration def initialize @handlers = {} end def register_webhook_handler(id, handler) unless handler.respond_to? :call raise Spree::Webhook::InvalidHandler, "Please provide a handler that responds to #call, got: #{handler.inspect}" end @handlers[id.to_sym] = handler end def find_webhook_handler(id) @handlers[id.to_sym] end end def self.config @config end def self.reset_config! @config = Configuration.new end reset_config! # initialize the extension end
Version data entries
4 entries across 4 versions & 1 rubygems