let me know if there is a direct method that I can use. there is one in rails activesupport I guess but do you want that as a dependency?