class Robot::CommandCentre

Constants

COMMANDS

Public Instance Methods

parse_and_execute(command_string) click to toggle source
# File lib/robot/command_centre.rb, line 9
def parse_and_execute(command_string)
  command = Command.new(command_string.strip.upcase)
  return unless command.validate
  command.execute
end
say(message) click to toggle source

feature just for fun only for mac users

# File lib/robot/command_centre.rb, line 17
def say(message)
  IO.popen(
    "say -v Ralph '#{message}'"
  ) if RbConfig::CONFIG['host_os'].match(/darwin|mac os/)
end