Skip to content

Instantly share code, notes, and snippets.

View travisdahlke's full-sized avatar

Travis Dahlke travisdahlke

View GitHub Profile
# This option has the most clarity, but I generally hate local variables in a
# method, preferring to use tap.
def calculated_foo
available_foos = []
available_foos << bar
available_foos << baz.qux if baz
available_foos.max
end
# It's a little less clear, unless you know what tap is, and `end.max` is