Delegation is, simply put, is when one object uses another object for a method's invocation.
If you have something like this:
class A
def foo
puts "foo"
end
end
class B
def initialize
@a = A.new
end
def bar
puts "bar"
end
def foo
@a.foo
end
end
An instance of the B class will utilize the A class's foo
method when its foo
method is called. The instance of B
delegates the foo
method to the A
class, in other words.