Class: Zaikio::Webhooks::EventSerializer
- Inherits:
-
ActiveJob::Serializers::ObjectSerializer
- Object
- ActiveJob::Serializers::ObjectSerializer
- Zaikio::Webhooks::EventSerializer
- Defined in:
- lib/zaikio/webhooks/event_serializer.rb
Instance Method Summary collapse
Instance Method Details
#deserialize(data) ⇒ Object
12 13 14 |
# File 'lib/zaikio/webhooks/event_serializer.rb', line 12 def deserialize(data) Event.new(data.without("_aj_serialized")) end |
#serialize(event) ⇒ Object
8 9 10 |
# File 'lib/zaikio/webhooks/event_serializer.rb', line 8 def serialize(event) super(event.to_h) end |
#serialize?(argument) ⇒ Boolean
4 5 6 |
# File 'lib/zaikio/webhooks/event_serializer.rb', line 4 def serialize?(argument) argument.is_a? Event end |