Encapsulation in Ruby on Rails

In Object-Oriented Programming, encapsulation is one of the fundamentals concept. Understand encapsulation will help you write concise and easy to maintain code. But what exactly is encapsulation? If you search on the Internet you might find something like this: encapsulation is hide the internal representation or state of an object.…