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!

···

--
Posted via http://www.ruby-forum.com/.

Yes.

···

On Wed, Nov 24, 2010 at 7:17 PM, David E. <davidreynon@gmail.com> wrote:

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?

--
Phillip Gawlowski

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.

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

Kind regards

  robert

···

On 24.11.2010 19:17, David E. wrote:

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?

--
remember.guy do |as, often| as.you_can - without end
http://blog.rubybestpractices.com/

Thanks for the help! This procedure worked!

···

--
Posted via http://www.ruby-forum.com/.