class Robot::Commands::NoOp

A no operation command that gets returned to avoid nil exceptions when the command the user enters is invalid. The idea is based on the null pointer design pattern

Public Class Methods

call(position) click to toggle source
# File lib/robot/commands/no_op.rb, line 13
def self.call(position)
  position
end
matches?(_command) click to toggle source
# File lib/robot/commands/no_op.rb, line 9
def self.matches?(_command)
  true
end