From: andrew mcelroy Date: 2011-06-30T06:11:01+09:00 Subject: Re: A movie Renamer --000e0cd2bfae12c0b604a6e01fa4 Content-Type: text/plain; charset=ISO-8859-1 On Wed, Jun 29, 2011 at 10:37 AM, Mayank Kohaley wrote: > Hello Guys, > > I am trying to develop "A movie renamer" in ruby and wanted to get some > ideas on Object oriented design, this is my first time with an Object > Oriented language so it would really help me if somebody would help me > design my application. The kind of things which I want to accomplish are: > > - Renaming movie files in a directory from a format like > "The.Passion.Of.The.Christ.2004.UNCUT.720p.BRRip.x264.AC3.dxva-HDLiTE" to a > Good looking movie name "The Passion of the Christ" > - If this goes well then would like to add year also along with the movie > name. > > Piracy is bad. Don't do piracy. mmmkay? As for your answer. look to the file class in core. http://www.ruby-doc.org/core/classes/File.html http://www.ruby-doc.org/core/classes/Dir.html Also, shameless plug here, check out tryruby.org I have a lesson in there that runs through using the basics of dir. Granted, in my example I am using fakefs under the hood-- for security purposes. > Couple of things which I want to achieve by developing this is to > understand > TDD(so yes I want to write tests for my application), Object Oriented > design. It would be great if somebody can mentor me also in my pet project. > > You may want to start off with test unit. See if you can get a hold of a copy of ruby in practice. I like how they teach BDD/TDD. Also the defacto BDD testing book is the RSpec Book. Andrew McElroy > -- > Mayank Kohaley > --000e0cd2bfae12c0b604a6e01fa4--