class SpecialDelivery::EventFactory

Constants

EVENT_TYPE_CLASSES

Public Class Methods

new_event(event_params) click to toggle source
# File lib/special_delivery/event_factory.rb, line 13
def self.new_event(event_params)
  event_type = event_params.fetch(:event)

  EVENT_TYPE_CLASSES.fetch(event_type).new(event_params)
end