Class: TwoPercent::Domain::Events::BaseEvent
- Inherits:
-
AetherObservatory::EventBase
- Object
- AetherObservatory::EventBase
- TwoPercent::Domain::Events::BaseEvent
- Defined in:
- lib/two_percent/domain/events/base_event.rb
Overview
Base class for domain events These are domain-focused, not SCIM-specific
Direct Known Subclasses
GroupCreated, GroupDeleted, GroupUpdated, UserCreated, UserDeleted, UserUpdated
Instance Method Summary collapse
-
#apply_to_model(model_class) ⇒ ActiveRecord::Base?
abstract
Apply this event to a domain model class.
Instance Method Details
#apply_to_model(model_class) ⇒ ActiveRecord::Base?
This method is abstract.
Override in subclasses to implement event-specific logic
Apply this event to a domain model class
Events know how to apply themselves to domain models, implementing the “tell, don’t ask” principle and avoiding case statements.
21 22 23 |
# File 'lib/two_percent/domain/events/base_event.rb', line 21 def apply_to_model(model_class) raise NotImplementedError, "#{self.class} must implement #apply_to_model" end |