Mike Chao wrote in post #996303: > 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 Instance methods are private by default. If you define an accessor method, then they become public-like: class Dog attr_accessor :name def initialize(name) @name = name end end d = Dog.new('George') puts d.name d.name = ('Sally') puts d.name --output:-- George Sally -- Posted via http://www.ruby-forum.com/.