From: Steve Klabnik Date: 2011-05-03T09:21:56+09:00 Subject: Re: Object-Oriented Programming --000e0ce0b71e8875da04a25420c2 Content-Type: text/plain; charset=ISO-8859-1 Hey Mike- You can only declare methods private, not variables, and even then, it's just a suggestion: class A private def foo "bar" end end a = A.new a.send(:foo) #=> "bar" -Steve On Mon, May 2, 2011 at 7:11 PM, Mike Chao wrote: > Hey guys, i'm trying to make a class in Ruby and I was wondering if it's > possible to create public and private instance variables. > > -Thanks > > -- > Posted via http://www.ruby-forum.com/. > > --000e0ce0b71e8875da04a25420c2--