Re: Newbie query regarding ruby best practice
- From: "rmagick@xxxxxxxxx" <rmagick@xxxxxxxxx>
- Date: 31 Jan 2006 05:07:11 -0800
Welcome to Ruby! Regarding your question, let's use irb try it out...
C:\irb
irb(main):001:0> require 'fileutils'
=> true
irb(main):002:0> fu = FileUtils.new
NoMethodError: undefined method `new' for FileUtils:Module
from (irb):2
irb(main):003:0> quit
Looks like FileUtils isn't a class and doesn't have a .new method. It's
just a module that contains a bunch of handy methods for file
operations.
FileUtils has very good documentation. Use "ri FileUtils" to see it.
.
- References:
- Newbie query regarding ruby best practice
- From: Neowulf
- Newbie query regarding ruby best practice
- Prev by Date: Re: Loop weirdness
- Next by Date: Re: Looking for web crawler written in Ruby
- Previous by thread: Newbie query regarding ruby best practice
- Next by thread: way to rexpect on windows
- Index(es):