> This won't work though
...
> The problem seems to be that the writer is setting the variable @foo
but 
> the reader is reading the variable @foo?


Serves me right for not properly testing. Here's an eval based
implementation (tested properly this time :)

class Module
  def attr_bool sym
    module_eval <<-CODE
      def #{sym}?; @#{sym}; end
      def #{sym}=(s); @#{sym}=s; end
    CODE
  end
end