Class: BulkPushEventPayloadService
- Inherits:
-
Object
- Object
- BulkPushEventPayloadService
- Defined in:
- app/services/bulk_push_event_payload_service.rb
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(event, push_data) ⇒ BulkPushEventPayloadService
constructor
A new instance of BulkPushEventPayloadService.
Constructor Details
#initialize(event, push_data) ⇒ BulkPushEventPayloadService
Returns a new instance of BulkPushEventPayloadService.
4 5 6 7 |
# File 'app/services/bulk_push_event_payload_service.rb', line 4 def initialize(event, push_data) @event = event @push_data = push_data end |
Instance Method Details
#execute ⇒ Object
9 10 11 12 13 14 15 16 17 18 |
# File 'app/services/bulk_push_event_payload_service.rb', line 9 def execute @event.build_push_event_payload( action: @push_data[:action], commit_count: 0, ref_count: @push_data[:ref_count], ref_type: @push_data[:ref_type] ) @event.push_event_payload.tap(&:save!) end |