I create class in Ruby without any attr\_\* method like attr\_reader, or attr\_writer or attr\_accessor.
So something like this

```
class DocumentIdentifier
 def initialize( folder, name )
  @folder = folder
  @name = name
 end
end

```

I mean it can be instantiated like this right

```
di = DocumentIdentifier.new(folder, 'image')

```

But i read some codes in some ruby books they also add attr\_\* to the instance variable like this

```
class DocumentIdentifier
 attr_reader :folder, :name
 def initialize( folder, name )
  @folder = folder
  @name = name
 end
end

```

My question is, should we use attr\_\* in every class definition and why is the reason?