Class: GustoEmbedded::Models::Shared::Event
- Inherits:
-
Object
- Object
- GustoEmbedded::Models::Shared::Event
- Extended by:
- T::Sig
- Includes:
- Crystalline::MetadataFields
- Defined in:
- lib/gusto_embedded/models/shared/event.rb
Overview
Representation of an Event
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(uuid:, event_type: nil, resource_type: nil, resource_uuid: nil, entity_type: nil, entity_uuid: nil, timestamp: nil) ⇒ Event
constructor
A new instance of Event.
Methods included from Crystalline::MetadataFields
#field, #fields, included, #marshal_single, #to_dict, #to_json
Constructor Details
#initialize(uuid:, event_type: nil, resource_type: nil, resource_uuid: nil, entity_type: nil, entity_uuid: nil, timestamp: nil) ⇒ Event
Returns a new instance of Event.
31 32 33 34 35 36 37 38 39 |
# File 'lib/gusto_embedded/models/shared/event.rb', line 31 def initialize(uuid:, event_type: nil, resource_type: nil, resource_uuid: nil, entity_type: nil, entity_uuid: nil, timestamp: nil) @uuid = uuid @event_type = event_type @resource_type = resource_type @resource_uuid = resource_uuid @entity_type = entity_type @entity_uuid = entity_uuid @timestamp = end |
Instance Method Details
#==(other) ⇒ Object
42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/gusto_embedded/models/shared/event.rb', line 42 def ==(other) return false unless other.is_a? self.class return false unless @uuid == other.uuid return false unless @event_type == other.event_type return false unless @resource_type == other.resource_type return false unless @resource_uuid == other.resource_uuid return false unless @entity_type == other.entity_type return false unless @entity_uuid == other.entity_uuid return false unless @timestamp == other. true end |