yob / pdf-reader

The PDF::Reader library implements a PDF parser conforming as much as possible to the PDF specification from Adobe.
MIT License
1.81k stars 271 forks source link

Provide access to code version #378

Open sebbASF opened 2 years ago

sebbASF commented 2 years ago

It would be useful to be able to get access to the version of the code that has been loaded.

If it has been loaded as a Gem, then the following should work:

Gem.loaded_specs['pdf-reader']&.version

However, there are other ways to require the code. In particular during testing it can be useful to load from a local directory tree.