I am delegating a couple of methods and also want them all to be private.
class Walrus
delegate :+, :to => :bubbles
def bubbles
0
end
end
I could say private :+
, but I would have to do that for each method. Is there a way to either return a list of delegated methods or have delegate create private methods?
delegate :method_1, :method_2, :method_3, :method_4, :method_5, :method_6, :method_7, :method_8, :method_9, :method_10, :to => :bubbles
thenprivate :method_1, :method_2, :method_3, :method_4, :method_5, :method_6, :method_7, :method_8, :method_9, :method_10
– Ronnieronny