Skip to content

Instantly share code, notes, and snippets.

@edthix
Created September 16, 2009 10:41
Show Gist options
  • Save edthix/187985 to your computer and use it in GitHub Desktop.
Save edthix/187985 to your computer and use it in GitHub Desktop.
# 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