Ruby - Blocks, Procs, and Lambdas
What is the output of the following Ruby code?
class Calculator
def add(x, y)
x + y
end
end
calc = Calculator.new
adder = calc.method(:add)
puts adder.call(5, 7)