code test by trainer ::: For Robot
check and Change the code and test the code by the trainer ........................ robots_controller.rb class RobotsController < ApplicationController skip_before_action :verify_authenticity_token def create @robot = Robot.new(params[:robot]) @robot.execute_commands! render :new RobotData.new(params[:robot]).execute_commands! return render json: @robot.report end end made file in lib folder :: file of robot data- check the sudo test with app name class RobotData include ActiveModel::Model attr_accessor :size_grid, :max_x, :max_y, :x, :y, :f, :commands, :report def initialize(params={}) @x = params[:x].try(:to_i) @y = params[:y].try(:to_i) @f = params[:f] || "" @size_grid = sanitize_size(params[:size_grid]) @max_x, @max_y = @size_grid.split('x').map(&:to_i) @commands = params...