Created
September 16, 2009 10:41
-
-
Save edthix/187985 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
# objective-j & ruby comparison - Methods | |
@implementation Person:CPObject | |
{ | |
CPString name; | |
-(void) setName: (CPString)aName | |
{ | |
name=aName; | |
} | |
-(CPString)name | |
{ | |
return name; | |
} | |
} | |
class Person < CPObject | |
@name = "" | |
def setName(aName) | |
@name = aName | |
end | |
def name | |
@name | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment