Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def greet(name)
- puts "hello #{name}"
- yield
- end
- greet(john) {puts "Nice to meet you!"}
- greet('john') {puts "Nice to meet you!"}
- def greet(name)
- puts "hello #{name}"
- yield
- end
- greet('john') {puts "Nice to meet you!"}
- # >> hello john
- # >> Nice to meet you!
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement