Class: OpenTrons::Commands
- Inherits:
-
Object
- Object
- OpenTrons::Commands
- Defined in:
- lib/opentrons/commands.rb
Instance Attribute Summary collapse
-
#command_list ⇒ Object
Returns the value of attribute command_list.
-
#protocol ⇒ Object
Returns the value of attribute protocol.
Instance Method Summary collapse
-
#initialize(protocol) ⇒ Commands
constructor
A new instance of Commands.
- #inspect ⇒ Object
-
#to_list ⇒ Object
return a pure list of hashes.
- #to_s ⇒ Object
Constructor Details
#initialize(protocol) ⇒ Commands
5 6 7 8 |
# File 'lib/opentrons/commands.rb', line 5 def initialize(protocol) @protocol = protocol @command_list = [] end |
Instance Attribute Details
#command_list ⇒ Object
Returns the value of attribute command_list.
3 4 5 |
# File 'lib/opentrons/commands.rb', line 3 def command_list @command_list end |
#protocol ⇒ Object
Returns the value of attribute protocol.
3 4 5 |
# File 'lib/opentrons/commands.rb', line 3 def protocol @protocol end |
Instance Method Details
#inspect ⇒ Object
19 20 21 |
# File 'lib/opentrons/commands.rb', line 19 def inspect to_s end |
#to_list ⇒ Object
return a pure list of hashes
11 12 13 |
# File 'lib/opentrons/commands.rb', line 11 def to_list return command_list.map {|command| command.to_hash} end |
#to_s ⇒ Object
15 16 17 |
# File 'lib/opentrons/commands.rb', line 15 def to_s "<OpenTrons::Commands:0x#{self.__id__.to_s(16)}>" end |