From: Timothy Hunter Date: 2005-04-08T21:34:40+09:00 Subject: Re: RMagick question Stephen Birch wrote: > Timothy Hunter(cyclists@nc.rr.com)@2005-04-08 08:44: > >>require 'RMagick' >>include Magick > > > Newbie Q ... why does RMagick need a require *and* an include > statement, I don't that in other packages? > > Steve > > The include statement isn't necessary, it's just that I'm a lazy typer. All the RMagick classes - Image, Draw, etc. - are enclosed in the Magick module. Without the include statement, you would refer to them as Magick::Image, Magick::Draw, etc. The include statement mixes the Magick module into Object, which adds the Magick constants to Object. Thereafter you can refer to these classes without the Magick prefix. Including Magick in Object in the general case is a bad idea because it could cause namespace conflicts, but for the purposes of an example it's okay and saves a few keystrokes.