Created
August 5, 2013 23:30
-
-
Save marciojrtorres/6160610 to your computer and use it in GitHub Desktop.
Padrão de nomes usado na linguagem Ruby
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
class Documento | |
attr_accessor :titulo, :conteudo ### declaração de atributos | |
### métodos escritos em minúsculas com underline e, | |
### quando boleanos, terminam com "?" | |
def sem_titulo? | |
return @titulo.nil? || @titulo.empty? | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment