Class: OpenTrons::PipetteCommand

Inherits:
Command
  • Object
show all
Defined in:
lib/opentrons/commands.rb

Direct Known Subclasses

BlowOut, DropTip, PickUpTip, TouchTip, VolumeCommand

Instance Attribute Summary collapse

Attributes inherited from Command

#command, #params

Instance Method Summary collapse

Methods inherited from Command

#inspect, #to_hash, #to_s

Constructor Details

#initialize(command, pipette, location) ⇒ PipetteCommand

Returns a new instance of PipetteCommand.



52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# File 'lib/opentrons/commands.rb', line 52

def initialize(command, pipette, location)
	super(command, {})

	pipette_id = pipette.instruments.instrument_hash.key pipette
	params["pipette"] = pipette_id

	if location.is_a? Array
		labware_item = location[0].labware_item
		params["labware"] = labware_item.labware.labware_hash.key labware_item
		params["well"] = location[0].location
		params["position"] = location[1]
	else
		labware_item = location.labware_item
		params["labware"] = labware_item.labware.labware_hash.key labware_item
		params["well"] = location.location
	end
end

Instance Attribute Details

#locationObject

Returns the value of attribute location.



50
51
52
# File 'lib/opentrons/commands.rb', line 50

def location
  @location
end

#pipetteObject

Returns the value of attribute pipette.



50
51
52
# File 'lib/opentrons/commands.rb', line 50

def pipette
  @pipette
end