Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Santiago
- def method_missing(method_id, *args)
- p "method_missing"
- self.class.class_eval do # do instead of here doc string
- def #{method_id}(*args)
- p "hello"
- end
- end # end of block instead of closing the string
- send(method_id, *args)
- end
- end
- Santiago.new.hello
- Santiago.new.hello
- Santiago.new.hello
Add Comment
Please, Sign In to add comment