Class: OpenTrons::Command
- Inherits:
-
Object
- Object
- OpenTrons::Command
- Defined in:
- lib/opentrons/commands.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#command ⇒ Object
Returns the value of attribute command.
-
#params ⇒ Object
Returns the value of attribute params.
Instance Method Summary collapse
-
#initialize(command, params) ⇒ Command
constructor
parent class for all the comands.
- #inspect ⇒ Object
- #to_hash ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(command, params) ⇒ Command
parent class for all the comands
28 29 30 31 |
# File 'lib/opentrons/commands.rb', line 28 def initialize(command, params) @command = command @params = params end |
Instance Attribute Details
#command ⇒ Object
Returns the value of attribute command.
25 26 27 |
# File 'lib/opentrons/commands.rb', line 25 def command @command end |
#params ⇒ Object
Returns the value of attribute params.
25 26 27 |
# File 'lib/opentrons/commands.rb', line 25 def params @params end |
Instance Method Details
#inspect ⇒ Object
44 45 46 |
# File 'lib/opentrons/commands.rb', line 44 def inspect to_s end |
#to_hash ⇒ Object
33 34 35 36 37 38 |
# File 'lib/opentrons/commands.rb', line 33 def to_hash as_hash = {} as_hash["command"] = command as_hash["params"] = params return as_hash end |
#to_s ⇒ Object
40 41 42 |
# File 'lib/opentrons/commands.rb', line 40 def to_s "<OpenTrons::Command:0x#{self.__id__.to_s(16)}>" end |