Created
June 1, 2014 14:02
-
-
Save murajun1978/5fa655a6a7cf8f09d730 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
class Murajun | |
def initialize(name) | |
@name = name | |
end | |
def murajun? | |
@name == "murajun" | |
end | |
end | |
class Name | |
def hello_murajun(name) | |
if name.murajun? | |
"Hello, murajun." | |
else | |
"You're not murajun." | |
end | |
end | |
end | |
murajun = Murajun.new("murajun1978") | |
name = Name.new | |
p name.hello_murajun(murajun) # => You're not murajun. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment