add register_as class method

Don't hardwire usage of PluginClasses, but hide it
behind `register_as` mathod.
Merge pull request #6 from bejbus/register_as

add register_as class method