Importing CSV data into a ruby array/variable
问题 I am trying to use a CSV as a settings file in a plugin for the SiriProxy project to use wake-on-lan. This project is based on ruby. So the csv is as follows: Name, MACAddress Desktop, 01-23-45-67-89-ab Computer, 02-46-81-02-46-cd and so on... So what I would like to happen is that when the variable userAction is "Desktop" for instance, then I query the CSV and it returns the MAC address into another variable. I am lost on how to do this. I have seen the csv and faster_csv but do not know how