Created
February 2, 2012 11:01
-
-
Save iain/1722900 to your computer and use it in GitHub Desktop.
Kill me now!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def some_method(param) | |
foo = nil | |
if param | |
if param == "value" | |
foo = get_foo_somehow | |
else | |
foo = get_foo_some_other_way | |
end | |
unless foo | |
foo = find_foo | |
if foo | |
foo = foo.modify | |
else | |
foo = foo.modify_other | |
end | |
end | |
else | |
foo = find_foo_in_yet_another_way | |
foo = calculate_foo unless foo | |
end | |
return foo | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
thankfully there is a return statement on line 21... that clears things up!