Created
January 25, 2016 10:27
-
-
Save mikecmpbll/90ddc01c9c93f1db66e7 to your computer and use it in GitHub Desktop.
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
class Whatever | |
attr_accessor :error | |
def grava_lead(attrs) | |
if some_condition | |
@error = "Some error" | |
return false | |
end | |
# ... | |
end | |
end | |
w = Whatever.new | |
if w.grava_lead(attrs) | |
# success | |
else | |
w.error # => "Some error" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment