I prefer to use @, for the following reason:

  class A
    attr_accessor :foo

    def do_thing
      @foo = "this"
      foo = "that"

      puts @foo # -> "this", not "that", which might be a surprise
    end
  end

  A.new.do_thing

--
Alex

-- 
Posted via http://www.ruby-forum.com/.