Created
July 18, 2011 02:14
-
-
Save prodis/1088405 to your computer and use it in GitHub Desktop.
Ruby Fundamental - O início de um novo blog
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 Saudacao | |
def initialize(name) | |
@name = name | |
end | |
def saudar | |
"Bem vindo, #{@name}!" | |
end | |
end | |
s = Saudacao.new "Ruby Fundamental" | |
puts s.saudar # => Bem vindo, Ruby Fundamental! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment