------art_23632_26433119.1166471698205
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

On 12/18/06, bill walton <bill.walton / charter.net> wrote:
>
> ...
> thought I'd ask if anybody 1) has any experience with mods to
> PDF::Writer or 2) has experience with extending other GEMS they'd be
> willing to share to help me avoid problems.


I haven't done anything with PDF::Writer, but I have extended several gems
on my own system. Because of Ruby's open classes, its easy to add or
override definitions of existing classes. I've used this to "patch" bugs in
gems, or to add new features to them, without affecting the original source
files. For example, if you're code lives in "make_my_pdf.rb", you can do
somethign like this:

  require 'pdf_writer' # original gem

  class PDF::Writer
   ... add new methods, override existing ones, etc.
  end

  PDF::Wrtier.new # do your work

If I find myself needing to fix a bug within a method, I've just pasted the
definition in to my "local" copy and modified it there.

I have also found that most gem maintainers are glad to accept patches and
apply them. If you include some unit tests, your patch is even more likely
to get accepted.

HTH.

Justin

------art_23632_26433119.1166471698205--