Class: FeatureChannel::Subscriber::MessageProcessor
- Inherits:
-
Object
- Object
- FeatureChannel::Subscriber::MessageProcessor
- Defined in:
- lib/feature_channel/subscriber/message_processor.rb
Constant Summary collapse
- OPERATIONS =
{ 'CREATE' => :create_entity, 'UPDATE' => :update_entity, 'DELETE' => :delete_entity }.freeze
Instance Method Summary collapse
-
#initialize(message:, model:) ⇒ MessageProcessor
constructor
A new instance of MessageProcessor.
- #run! ⇒ Object
Constructor Details
#initialize(message:, model:) ⇒ MessageProcessor
Returns a new instance of MessageProcessor.
12 13 14 15 |
# File 'lib/feature_channel/subscriber/message_processor.rb', line 12 def initialize(message:, model:) @model = model = end |
Instance Method Details
#run! ⇒ Object
17 18 19 |
# File 'lib/feature_channel/subscriber/message_processor.rb', line 17 def run! method(operation_callback).call(model: @model, params: entity_params) end |