I created some class
class Book
def perform
yield
end
end
Then I want to call the block which will call method1 and method2. However both methods are defined nowhere and I dont want to define them. Instead of this I'd like to call method_missing but I get:
undefined local variable or method 'method1' for main:Object (NameError)
book = Book.new
book.perform do
method1
method2
end
What Should I do then?