Method: Clever::Types::Event#initialize
- Defined in:
- lib/clever/types/event.rb
#initialize(attributes = {}) ⇒ Event
Returns a new instance of Event.
22 23 24 25 26 27 |
# File 'lib/clever/types/event.rb', line 22 def initialize(attributes = {}, *) @uid = attributes['id'] @type, @action = attributes['type'].split('.') @object = TYPE_MAP[@type]&.new(attributes['data']['object']) @provider = 'clever' end |