0

Pure straightfoward question.

I code in Java and started learning Ruby not long ago. Got this question in my mind.

Bruno Morales
  • 195
  • 1
  • 13
  • I'm voting to close this question as off-topic because No Effort. This is asking 'give me a beginners tutorial' as if the internet doesn't have beginner's tutorials on Ruby “You should only ask practical, answerable questions based on actual problems that you face.” – Chris F Carroll Oct 26 '17 at 22:43

1 Answers1

0
class Foo
  attr_accessor :bar, :baz
end

Based on what I know, I think it automatically sets getters and setters. Just that you access it with the same name.

Priyank Kapadia
  • 203
  • 4
  • 14