You first need to learn Ruby programming, then learn the SketchUp API that adds classes and modules to the Ruby core. I made a Learning Resources list:
The dictionary for the SketchUp Ruby API:
More specific pointers to docs, based upon your questions:
method: Sketchup::DefinitionList.load()