PDF::Hash a bad name?

4 views
Skip to first unread message

Gregory Brown

unread,
Jan 10, 2010, 11:56:08 AM1/10/10
to Prawn
Hi James,

I'm working on the experiment of breaking off a subset of Prawn into
the the PDF namespace. But I'm finding that anywhere I previously
referenced Hash in prawn now points to PDF::Hash instead of ::Hash.
So I'm needing to go around adding :: everywhere, usually after
hunting down subtle and hard to locate bugs (even w. our tests)

Maybe PDF::Hash should be called something else? Even
PDF::Data::Hash might prevent this issue, But it might be best to
call it something else entirely.

-greg

James Healy

unread,
Jan 15, 2010, 11:08:16 PM1/15/10
to prawn...@googlegroups.com
I agree, I hadn't considered the ramifications.

I don't like the idea of nesting it inside another module. I'd prefer
PDF::XXX, but I'm struggling to come up with names. Any other
suggestions?

It's a collection of objects - maybe PDF::Objects?

-- James Healy <ji...@deefa.com> Sat, 16 Jan 2010 15:07:11 +1100

> --
> You received this message because you are subscribed to the Google Groups "Prawn" group.
> To post to this group, send email to prawn...@googlegroups.com.
> To unsubscribe from this group, send email to prawn-ruby+...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/prawn-ruby?hl=en.
>
>

Gregory Brown

unread,
Jan 16, 2010, 12:19:54 AM1/16/10
to prawn...@googlegroups.com
On Fri, Jan 15, 2010 at 11:08 PM, James Healy <ji...@deefa.com> wrote:
> I agree, I hadn't considered the ramifications.
>
> I don't like the idea of nesting it inside another module. I'd prefer
> PDF::XXX, but I'm struggling to come up with names. Any other
> suggestions?
>
> It's a collection of objects - maybe PDF::Objects?

Yeah, I think that's acceptable (though a bit too close to Object for my liking)

PDF::ObjectDictionary ?

-greg

James Healy

unread,
Jun 2, 2010, 1:18:46 AM6/2/10
to prawn...@googlegroups.com
Gregory Brown wrote:
> > It's a collection of objects - maybe PDF::Objects?
>
> Yeah, I think that's acceptable (though a bit too close to Object for my liking)
>
> PDF::ObjectDictionary ?

This is (finally) partially fixed in the pdf-reader master branch, and
will be completely fixed before the next release.

PDF::Hash will be deprecated in favour of PDF::Reader::ObjectHash, which
should avoid namespace issues. For at least 1 or 2 releases the
PDF::Hash class will continue to exist and print a deprecation warning.

I'll arrange a patch for prawn to use the new class name before I
release a gem.

-- James Healy <ji...@deefa.com> Wed, 02 Jun 2010 15:17:21 +1000

Gregory Brown

unread,
Jun 2, 2010, 7:26:11 AM6/2/10
to prawn...@googlegroups.com
On 6/2/10 1:18 AM, James Healy wrote:

> I'll arrange a patch for prawn to use the new class name before I
> release a gem.

Sweet! Thanks.

Reply all
Reply to author
Forward
0 new messages