libraries/PlateReaderHelper.rb
# could extend a module with common class variables needed in protocol writing
could extend a module with common class variables needed in protocol writing
could extend a module with common class variables needed in protocol writing
def gather_materials(empty_containers: [], transfer_required: false, new_materials: [], take_items: [])
    new_materials = new_materials.select {|m| !Protocol.materials_list.include? m}
    if !new_materials.empty?
      show do
        title "Gather The Following Materials"
        separator
        note "Gather the following and bring them to your bench:"
        empty_containers.each {|c|
          ((c.is_a? Item) || (c.is_a? Collection)) ? (check "#{c.object_type.name} and label as <b>#{c.id}</b>") : (check "#{c}")
        }
        new_materials.each {|m| check "#{m}" }
      end 
    end
    take take_items, interactive: true 
    Protocol.materials_list.concat(new_materials).concat(empty_containers)
  end
def gather_materials ( empty_containers : [ ] , transfer_required : false , new_materials : [ ] , take_items : [ ] ) new_materials = new_materials . select { | m | ! Protocol . materials_list . include? m } if ! new_materials . empty? show do title "Gather The Following Materials" separator note "Gather the following and bring them to your bench:" empty_containers . each { | c | ( ( c . is_a? Item ) || ( c . is_a? Collection ) ) ? ( check "#{c.object_type.name} and label as <b>#{c.id}</b>" ) : ( check "#{c}" ) } new_materials . each { | m | check "#{m}" } end end take take_items , interactive : true Protocol . materials_list . concat ( new_materials ) . concat ( empty_containers ) end
could extend a module with common class variables needed in protocol writing
could extend a module with common class variables needed in protocol writing
empty_containers
transfer_required
new_materials
take_items