Refactor Resource.wrap to work with any Enumerable object, not just Arrays.