G
Gene Angelo
Hello,
Is there a short cut for creating a property that has read-only access
from instance variables and read/write access for derived classes?
Was looking for something like...
attr_reader rompt
attr_writer protected rompt
or am I doomed to do it this way...
#...
def prompt
@prompt
end
def prompt=(value)
@prompt=value
end
protected rompt=
#...
Is there a short cut for creating a property that has read-only access
from instance variables and read/write access for derived classes?
Was looking for something like...
attr_reader rompt
attr_writer protected rompt
or am I doomed to do it this way...
#...
def prompt
@prompt
end
def prompt=(value)
@prompt=value
end
protected rompt=
#...