Inheriting a ruby class from different file location

So I’d like to inherit a ruby class as such:

class ClassOne < ClassOneA

def blah1
end
def blah2
end

end

The caveat is that ClassOneA is NOT in the same file location as
ClassOne. How do I allow for ClassOne to “look for” ClassOneA.

Would i have to “require” it and then inherit it?

Thanks in advance!

On Wed, Nov 24, 2010 at 7:17 PM, David E. [email protected] wrote:

The caveat is that ClassOneA is NOT in the same file location as
ClassOne. How do I allow for ClassOne to “look for” ClassOneA.

Would i have to “require” it and then inherit it?

Yes.


Phillip G.

Though the folk I have met,
(Ah, how soon!) they forget
When I’ve moved on to some other place,
There may be one or two,
When I’ve played and passed through,
Who’ll remember my song or my face.

On 24.11.2010 19:17, David E. wrote:

The caveat is that ClassOneA is NOT in the same file location as
ClassOne. How do I allow for ClassOne to “look for” ClassOneA.

Would i have to “require” it and then inherit it?

You would require the file ClassOneA is defined in - it need not
necessarily be named after the class.

Kind regards

robert

Thanks for the help! This procedure worked!