Last active
December 21, 2015 04:49
-
-
Save erkattak/6252073 to your computer and use it in GitHub Desktop.
how would one refactor this?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DeviceCloud.event_notification_processors = [ ParkingSessionEventHandler, ParkingLotEventHandler, PermitPurchaseEventHandler ] | |
DeviceCloud.event_notification_handler = Proc.new do |event_notification| | |
DeviceCloud.event_notification_processors.each { |processor| processor.perform_async(event_notification.raw_data) if processor.processable?(event_notification.type) } | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Not sure if adding a processors config to the device_cloud gem makes sense. In this case the only real reason I need it is because one event type needs the meter..
Need to refactor the gem to take out any assumptions about what kind of data is in the device cloud FileData