Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # example 1
- def love_me?("reply")
- "She does" if reply == "yes"
- "No bro" if reply != "yes"
- end
- # example 2
- def love_me?("reply")
- if reply == "yes"
- "She does"
- else
- "No bro"
- end
- In the above what is returned is the result of the if statement. I like the brevity of example 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement