Is there a way that I can use attr_accessor or attr_reader so that I
can access a boolean variable with a ‘?’ appended to the end of the name?
For example:
class Test
attr_accessor :bit
end
t = Test.new
That will allow ‘t.bit = true’, or ‘if t.bit’ but it won’t do ‘if t.bit?’,
which is clearer, IMO.
-Michael