From: Chad Perrin Date: 2011-04-20T02:15:50+09:00 Subject: Re: help me on this ruby programm --/Uq4LBwYP4y1W6pO Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Apr 19, 2011 at 03:12:41PM +0900, srikanth madakam wrote: > Vincent Manis wrote in post #993686: > > On 2011-04-18, at 22:54, srikanth madakam wrote: > > > >> Hi, > >> > >> Write a program to create employee record with configurable number of > >> employes(5) and write the records to a text file > >> Emp ID: > >> Emp Name: > >> Emp Designation: > >> Emp DOB: > >> Please help me on above programm. > > > > That sounds like an exercise in a programming course. I'm sure many of > > us would be happy to help you, if you show us what you've done so far, > > and ask us questions about what you don't understand. On the other hand, > > I don't think any of us want just to write the program for you. > > > > -- vincent >=20 > Hi, >=20 > i want to know, i want to create a class with above objects and pass the= =20 > same values via command line. help me on this. With such a vague question, I'll provide a somewhat vague answer: Use the class keyword to create a class. Use an initialize method to take input arguments for the data you need. Create an hash as an instance variable to store the relevant data. If you need to be able to make changes to data stored in your object's instance variables, you might want to look into the attr_accessor method. If you want more information than that, though, you're going to have to give us more to go on, and show us that you're not just asking us to do your homework for you (or get someone who doesn't care about the homework to give you code, I suppose). --=20 Chad Perrin [ original content licensed OWL: http://owl.apotheon.org ] --/Uq4LBwYP4y1W6pO Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAk2twDAACgkQ9mn/Pj01uKV2RACgwjfkUmFsVE26MadjJuRLO3J6 8CoAni12do51XXQ2bidiNgdQZtikGYhY =UXc5 -----END PGP SIGNATURE----- --/Uq4LBwYP4y1W6pO--