Class: MessengerCreator

Inherits:
ApplicationRecord show all
Defined in:
app/models/messenger_creator.rb

Overview

A messenger creator acts as a message factory for a given for a given plate. They are currently triggered by:

  1. Cherrypick batch release

They specify both a template (under Api::Messages) and a root

Defined Under Namespace

Classes: SelfFinder, WellFinder

Instance Method Summary collapse

Methods inherited from ApplicationRecord

convert_labware_to_receptacle_for, find_by_id_or_name, find_by_id_or_name!

Methods included from Warren::BroadcastMessages

#broadcast, included, #queue_associated_for_broadcast, #queue_for_broadcast, #warren

Instance Method Details

#create!(base) ⇒ Object


32
33
34
35
36
# File 'app/models/messenger_creator.rb', line 32

def create!(base)
  finder.new(base).each_target do |target|
    Messenger.create!(target: target, root: root, template: template)
  end
end