Sha256: 6d8928dcabaa6cc0e9e33a1fa420224295bd397de714e4078ca02ca2b10a4623
Contents?: true
Size: 549 Bytes
Versions: 10
Compression:
Stored size: 549 Bytes
Contents
# frozen_string_literal: true module SolidusBolt class Sorter attr_reader :params def self.call(params) new(params).call end def initialize(params) @params = params end def call handler&.call(params) end private def handler class_name = "#{event_type.split('.').map(&:capitalize).join}Handler" return unless SolidusBolt::Handlers.const_defined?(class_name) SolidusBolt::Handlers.const_get(class_name) end def event_type params[:type] end end end
Version data entries
10 entries across 10 versions & 1 rubygems