Method chaining
kiriakosv opened this issue · comments
Kiriakos Velissariou commented
Hello, is there a rule regarding method chaining? For example:
person = Person.new
# bad
person.name("Peter").age(21).introduce
# good
person.name("Peter")
.age(21)
.introduce
If not, can I make a pull request to add one?
Brian Morearty commented
@kiriakosv Thank you for offering to contribute.
We allow method chaining within the same line. And we generally put the dot at the end of the line when we break it up across lines.