def adult? age >= 18 end
Simplicity, just the necessary words to be easy to read.
No return keyword. No self.age to access instance attributes/methods. No weird method names (like isAdult).
return
self.age
isAdult
Trying to do the same in other languages seems that I'm writing unnecessary symbols.
Ruby is so readable and clean 💖 Thank you for this example, it is something everyone can understand from the get-go.
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Simplicity, just the necessary words to be easy to read.
No
return
keyword.No
self.age
to access instance attributes/methods.No weird method names (like
isAdult
).Trying to do the same in other languages seems that I'm writing unnecessary symbols.
Ruby is so readable and clean 💖
Thank you for this example, it is something everyone can understand from the get-go.