Skip to content

Instantly share code, notes, and snippets.

@mustmodify
Created November 14, 2014 17:11
Show Gist options
  • Save mustmodify/e9beb040c4704cb324d9 to your computer and use it in GitHub Desktop.
Save mustmodify/e9beb040c4704cb324d9 to your computer and use it in GitHub Desktop.
class Person
def say(message)
puts "Some people would say '#{message}'"
end
def hey_do_something_for_me( proc )
proc.call
end
end
say_yes = lambda { say('yes') }
Person.new.hey_do_something_for_me( say_yes )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment