From: Wendy Randquist Date: 2013-05-20T10:35:41+09:00 Subject: Re: new, with an idea, and not sure what to learn next unknown wrote in post #1109536: > Am 19.05.2013 22:31, schrieb Matt Lawrence: >>> project like this? What other sources are there for learning how to do >>> things like divide time in pay periods and having the program deal with >>> real-time? >> >> You need some form of persistent data storage. For me, I had a similar >> problem recently so I set up MySQL and am using the Sequel gem to >> provide a simplistic (and not even relational) data store. Using Sqlite >> would be even easier for your application. > > For simple file-based storage where no relational database is needed > there's also e.g. > > - YAML::Store > - CSV > - File.open(filename, 'w'), > combined with YAML.dump/YAML.load_file or plain text > > That's probably easier to play around with at the beginning > and does not require setting up a MySQL server. Thanks! It took a few hours of playing around, but having direction on things to look up really helped. For now I'm messing around with the 'File.open' method. I'm currently dividing minutes from hours (I want to be able to sum up the total worked) and have two separate blocks of code - one dealing with minutes and one with hours - that are basically the same. I've tried writing a method, but the only way I can think to do that is by passing which file I'm using as a parameter and that doesn't seem to work. Should it? -- Posted via http://www.ruby-forum.com/.