You can only access the Materials that are loaded into the Model.
You can iterate the list and get various aspects of the material.
Sketchup.active_model.materials.each{|material|
puts material.name
puts material.display_name
puts material.color
puts material.alpha
puts material.texture
### and so on...
puts
}
I have included the puts so the info is shown in the Ruby Console but of course you can do other things with that...
A Material's '.display_name' is not always the same as the '.name' [depends on its creation/source]
A Texture can also be further probed to get info like its image, size and so on...
Read the API http://www.sketchup.com/intl/en/developer/docs/classes.php
If you must get details of SKM files not yet loaded [and not loadable using native API methods] then you could look at my SKMtools which offer many additional tools to import/export/interrogate SKM files etc...
But please learn to walk before you run π