Ruby program to import and export data between csv and json using dynamic classes