Is tehre a way to test if a ruby script is run as a sudoer user ?

For the time being i'm using a zsh script to test that however I'd like
using ruby only.

the zsh i'm using :
#! /usr/bin/env zsh

[ "$SUDO_USER" -a `id -u` -eq 0 ] || {
  echo "false"
  exit 0
}
echo "true"
exit 0


-- 
? Comment peser sur le bulletin? 
  Tu t'assieds dessus. ? 
  (Anonyme)