Class: PipelineService::Commands::Publish
- Inherits:
-
Object
- Object
- PipelineService::Commands::Publish
- Defined in:
- app/services/pipeline_service/commands/publish.rb
Overview
Serialize a canvas object into their API format and send to the pipeline
Usage: Send.new(message: User.last).call
Instance Attribute Summary collapse
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#serializer ⇒ Object
readonly
Returns the value of attribute serializer.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(args) ⇒ Publish
constructor
A new instance of Publish.
Constructor Details
#initialize(args) ⇒ Publish
Returns a new instance of Publish.
11 12 13 14 15 16 |
# File 'app/services/pipeline_service/commands/publish.rb', line 11 def initialize(args) @args = args @object = args[:object] @changes = args[:changes] configure_dependencies end |
Instance Attribute Details
#message ⇒ Object (readonly)
Returns the value of attribute message.
9 10 11 |
# File 'app/services/pipeline_service/commands/publish.rb', line 9 def @message end |
#serializer ⇒ Object (readonly)
Returns the value of attribute serializer.
9 10 11 |
# File 'app/services/pipeline_service/commands/publish.rb', line 9 def serializer @serializer end |
Instance Method Details
#call ⇒ Object
18 19 20 21 22 23 |
# File 'app/services/pipeline_service/commands/publish.rb', line 18 def call return if SettingsService.get_settings(object: :school, id: 1)['disable_pipeline'] post_to_pipeline publish_events unless changes.nil? self end |