You should step away from that demo code, because it is hopelessly outdated and the API has radically changed since.
You can see all available methods in IRB when you type device.methods - Object.new.methods
, it's a trick i often use when i want to explore what an object has to offer. Maybe this will help you find the method you are looking for.