Hi there,
I just try to figure out were the differenz is between the ‘property’ macro …
#property
class Person
def name=(@name)
end
def name
@name
end
end
… and the ‘getter’ and ‘setter’ macro
# getter
class Person
def name
@name
end
end
# setter
class Person
def name=(@name)
end
end
It seems, that ‘property’ combines ‘getter’ & ‘setter’?
Is there any reason to use ‘getter’ and ‘setter’ instead of ‘property’? (In case I want be able to set and get ‘name’.)
Thanks
Bob