Created
October 20, 2015 01:35
-
-
Save gbpereira/5f55dc7f6bf435056380 to your computer and use it in GitHub Desktop.
This file contains 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
# métodos | |
def some_method() | |
end | |
# convenção para métodos booleanos | |
def empty?() | |
end | |
# convenção para métodos destrutivos | |
def sort!() | |
end | |
# convenção para setters | |
def timeout=() | |
end | |
# return é opcional, e muitas vezes omitido | |
# exemplo de utilização | |
def another_method | |
return unless some_condition | |
do_something | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment