Module: WCC::Contentful::Event
- Extended by:
- ActiveSupport::Concern
- Included in:
- Asset, DeletedAsset, DeletedEntry, Entry, SyncComplete, Unknown
- Defined in:
- lib/wcc/contentful/event.rb
Defined Under Namespace
Classes: Asset, DeletedAsset, DeletedEntry, Entry, Registry, SyncComplete, Unknown
Class Method Summary collapse
-
.from_raw(raw, context = nil, source: nil) ⇒ Object
Creates an Event out of a raw value received by a webhook or given from the Contentful Sync API.
Class Method Details
.from_raw(raw, context = nil, source: nil) ⇒ Object
Creates an Event out of a raw value received by a webhook or given from the Contentful Sync API.
11 12 13 14 15 |
# File 'lib/wcc/contentful/event.rb', line 11 def self.from_raw(raw, context = nil, source: nil) const = Registry.instance.get(raw.dig('sys', 'type')) const.new(raw, context, source: source) end |