Module: ToyRobot::Factory::RobotFactory
- Defined in:
- lib/toy_robot/factory.rb
Class Method Summary collapse
Class Method Details
.create(opts = {}) ⇒ Object
49 50 51 52 53 54 55 56 57 |
# File 'lib/toy_robot/factory.rb', line 49 def create(opts = {}) board = opts[:board] || BoardFactory.create pose = opts[:pose] || ToyRobot::Pose.new ToyRobot::Robot.new( board: board, pose: pose ) end |