Class: Uuids::Services::Add
- Inherits:
-
Hexx::Service
- Object
- Hexx::Service
- Uuids::Services::Add
- Defined in:
- app/services/add.rb
Overview
Adds the uuid to the record.
Class Method Summary collapse
-
.new(params) ⇒ Object
Constructs the service object.
-
.run ⇒ Object
Runs the service and publishes its results.
-
.subscribe(listener, options = {}) ⇒ Object
Subscribes a listener to receive the service’s notifications.
Class Method Details
.new(params) ⇒ Object
Constructs the service object.
37 |
# File 'app/services/add.rb', line 37 allow_params :record, :value |
.run ⇒ Object
Runs the service and publishes its results.
53 54 55 56 57 58 59 |
# File 'app/services/add.rb', line 53 def run run! rescue => err publish :error, err. else publish :created, uuid, end |
.subscribe(listener, options = {}) ⇒ Object
Subscribes a listener to receive the service’s notifications.
|
# File 'app/services/add.rb', line 39
|