This is a Ruby implementation of MobileESP library. It has been automatically generated from Java source code from the official MobileESP repository. It is converted with a Vim script so the result looks sloppy, but it is unit-tested to ensure it works OK.
MobileESP provides device type detection (tablet, mobile, etc.) based on HTTP request headers.
I just converted the code to Ruby, the original author is Anthony Hand.
For licensing of MobileESP and more info see MobileESP official site.