Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- methods = ["say", "sing", "shout"]
- methods.each do |method|
- # Man->method("Hello world!")
- Man->method "Hello world!"
- end
- # The actual way to do this.
- methods.each do |method|
- Man.send(method.intern, "Hello world!")
- end
Add Comment
Please, Sign In to add comment