B
Brian Schlect
I have a class:
class alpha
def test_method
puts "test method"
end
def get_methods
puts alpha.methods
end
end
running "get_methods" here will return a long list of methods including
test_method. But, I also have this class:
class bravo < alpha
def another_test_method
end
end
i want to be able to call get_methods in the parent class and have it
return the functions of the child class as well. so in this example:
test_obj = bravo.new
bravo.get_methods
would return all methods including
test_method
another_test_method
any ideas?
thanks,
Brian
class alpha
def test_method
puts "test method"
end
def get_methods
puts alpha.methods
end
end
running "get_methods" here will return a long list of methods including
test_method. But, I also have this class:
class bravo < alpha
def another_test_method
end
end
i want to be able to call get_methods in the parent class and have it
return the functions of the child class as well. so in this example:
test_obj = bravo.new
bravo.get_methods
would return all methods including
test_method
another_test_method
any ideas?
thanks,
Brian