Class: OpenTrons::Well

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(labware_item, location) ⇒ Well



122
123
124
125
126
# File 'lib/opentrons/labware.rb', line 122

def initialize(labware_item, location)
  @labware_item = labware_item
  @location = location
  @tip = true
end

Instance Attribute Details

#labware_itemObject

Returns the value of attribute labware_item.



120
121
122
# File 'lib/opentrons/labware.rb', line 120

def labware_item
  @labware_item
end

#locationObject

Returns the value of attribute location.



120
121
122
# File 'lib/opentrons/labware.rb', line 120

def location
  @location
end

#tipObject

Returns the value of attribute tip.



120
121
122
# File 'lib/opentrons/labware.rb', line 120

def tip
  @tip
end

Instance Method Details

#bottom(z) ⇒ Object



138
139
140
141
142
143
144
145
146
# File 'lib/opentrons/labware.rb', line 138

def bottom(z)
  position = {
    "anchor" => "bottom",
    "offset" => {
      "z" => z
    }
  }
  return [self, position]
end

#inspectObject



152
153
154
# File 'lib/opentrons/labware.rb', line 152

def inspect
  to_s
end

#to_sObject



148
149
150
# File 'lib/opentrons/labware.rb', line 148

def to_s
  "<OpenTrons::Well:0x#{self.__id__.to_s(16)}>"
end

#top(z) ⇒ Object



128
129
130
131
132
133
134
135
136
# File 'lib/opentrons/labware.rb', line 128

def top(z)
  position = {
    "anchor" => "top",
    "offset" => {
      "z" => z
    }
  }
  return [self, position]
end