Ruby/LDetect

Copyright (C) 2005,2007 Pascal Terjan

About Ruby/LDetect

Ruby/LDetect is a Ruby binding for Mandriva's libdetect.
It allows hardware detection and mapping to known modules.
Version 0.0.1 is for libldetect < 0.7.0, while 0.0.2 is for libldetect >= 0.7.0.

Download

You can fetch it in several places :

Usage

LDetect provides 2 main methods : pci_probe and usb_probe which return arrays of LDetectEntry.
A LDetectEntry is a Hash with keys "class_id", "class", "device", "subdevice", "vendor", "subvendor" and "text".
There are also 2 utility methods, usb_class2text and pci_class2text.