On Tuesday 16 May 2006 11:59 am, Wes Gamble wrote:
> Can I qualify classes using the first directory name under vendor?
>
> Say I have:
>
> vendor/html-scanner/html/node.rb
>
> Can I qualify the Node class using
>
> HTML-Scanner::HTML::Node?

There is nothing automatic to make this happen.  It needs extra magic that you 
would have to write yourself.

For instance, if node.rb looked something like this:

class Node
  # Node stuff here....
end

Then you could write your own require-like command:

myrequire 'vendor/html-scanner/html/node'

That would look at that path, translate it into the desired nested Module 
statements, and then load node.rb into that space.

Is that really what you are needing, though?  What are you trying to do?  If 
we know that, we may well be able to suggest a simpler approach.


Thanks,

Kirk Haines