Add a class method to build a persister from a hash
@Ladas I prefer this method over passing the type in the json and having the .from_hash do the constantize because it allows the caller (i.e. the backend persister) to build the class and constantize it over the builder of the json payload (i.e. the collector) from having to know the full class name.
This lets me have the collector reference the persister by name (i.e. "Default") rather than by a full class name which should be internal knowledge.
Add a class method to build a persister from a hash
@Ladas I prefer this method over passing the type in the json and having the .from_hash do the constantize because it allows the caller (i.e. the backend persister) to build the class and constantize it over the builder of the json payload (i.e. the collector) from having to know the full class name.
This lets me have the collector reference the persister by name (i.e. "Default") rather than by a full class name which should be internal knowledge.