Class: LabWhereClient::LabwareSearch

Inherits:
Endpoint
  • Object
show all
Defined in:
lib/lab_where_client.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Endpoint

endpoint_name

Constructor Details

#initialize(params_list) ⇒ LabwareSearch

Returns a new instance of LabwareSearch.



122
123
124
# File 'lib/lab_where_client.rb', line 122

def initialize(params_list)
  @labwares = params_list.map { |params| Labware.new(params) }
end

Instance Attribute Details

#labwaresObject (readonly)

Returns the value of attribute labwares.



111
112
113
# File 'lib/lab_where_client.rb', line 111

def labwares
  @labwares
end

Class Method Details

.find_locations_by_barcodes(barcodes) ⇒ Object



113
114
115
116
117
118
119
120
# File 'lib/lab_where_client.rb', line 113

def self.find_locations_by_barcodes(barcodes)
  return nil if barcodes.blank?

  payload = { barcodes: }

  attrs = LabWhere.new.post(self, '', payload)
  new(attrs) unless attrs.nil?
end