Class: Client
- Inherits:
-
Object
- Object
- Client
- Defined in:
- lib/another_toy_robot/client.rb
Instance Method Summary collapse
- #command_for(input) ⇒ Object
-
#initialize ⇒ Client
constructor
A new instance of Client.
Constructor Details
Instance Method Details
#command_for(input) ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/another_toy_robot/client.rb', line 12 def command_for(input) klass = input.to_class params = input.params command = klass.new target: @robot, params: params command.execute end |