I need to run multiple methods from an array like the folowing example, first approach works but i'd rather let just run the methods without displaying the result. How to adapt the second approach so that i don't get the error below ?
def method1
print 1
end
def method2
print 2
end
[method1, method2].each(&p) #=>12 (works)
[method1, method2].each(&method(:run))
#=>12 `method': undefined method `run' for class `Object' (NameError)