class RobotInterface::Help
Public Class Methods
print_help()
click to toggle source
# File lib/rubbot_cli.rb, line 60 def self.print_help help_message = <<-END.gsub(/^ {8}/, '') Robot Commands: ------------------------------------------------------ PLACE Places the robot at X, Y facing an orientation Orientations accepted: NORTH, EAST, SOUTH, WEST Format: 'X,Y,ORIENTATION'. i.e.: '2,3,NORTH' MOVE Moves the robot in current direction LEFT Turns the robot left RIGHT Turns the robot right REPORT Prints current state of the robot HELP Prints this help message ------------------------------------------------------ END end
Public Instance Methods
execute(robot, options = {})
click to toggle source
# File lib/rubbot_cli.rb, line 56 def execute(robot, options = {}) options.fetch(:output) << self.class::print_help end