class Foo
def initialize
@foo = ""
end
def add( var )
end
end
class Animal def initialize end end class Dog << Animal end class Cat << Animal end
class Foo
def initialize
@foo = ""
end
def add( var )
end
end
class Hoge
def initialize
@hoge = ""
end
def count( foo ) # foo は Foo のインスタンスを前提とする
end
end
hoge = Hoge.new
foo = Foo.new
hoge.count( foo )