Ruby script to convert Hein Online citations to AGLC

I use Hein Online a lot, but have recently become sick of having to manually reformat the citations it gives me for journal articles (to the format I use, following the Australian Guide to Legal Citation. So, procrastinating, I wrote a quick script to do exactly that. Someone else may find it useful.

Input example:

82 Ind. L.J. 261 (2007)
On Virtual Worlds: Copyright and Contract Law at the Dawn of the Virtual Age; Reuveni, Erez

AGLC formatted output:

Reuveni, Erez , “On Virtual Worlds: Copyright and Contract Law at the Dawn of the Virtual Age” (2007) 82 Ind. L.J. 261

Get the script here: Ruby script to convert Hein Online citations to AGLC