Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -1052,6 +1052,19 @@ end

== Flow of Control

=== Control Flow Keywords [[control-flow-keywords]]

Keywords that alter control flow, e.g. `next`, `raise`, `return`, etc. should appear at the beginning of the line.

[source,ruby]
----
# bad
makes_sense? ? "Great success!" : raise("Woah.")

# good
raise("Woah.") unless makes_sense?
----

=== No `for` Loops [[no-for-loops]]

Do not use `for`, unless you know exactly why.
Expand Down