I'd prefer to avoid introducing rails as a dependency of this class just for that (separate domain model and all that). The rest of the class is pure ruby...