Module: ToyRobot::Factory::ControllerFactory
- Defined in:
- lib/toy_robot/factory.rb
Class Method Summary collapse
Class Method Details
.create(opts = {}) ⇒ Object
21 22 23 24 25 26 27 28 29 |
# File 'lib/toy_robot/factory.rb', line 21 def create(opts = {}) robot = opts[:robot] || RobotFactory.create view = opts[:view] || ViewFactory.create(robot: robot) ToyRobot::Controller.new( robot: robot, view: view ) end |