This article explains the concept of value objects. It first defines and demonstrates various kinds of value objects, then it explains the rule to construct valid ones while covering the consequences of violating the concept. At last, it shows several ways to implement value objects in Ruby. Although the examples are written in Ruby, the concept could be easily applied to other languages as well.
![Value Objects Explained with Ruby — SitePoint](https://cdn-ak-scissors.b.st-hatena.com/image/square/7649284010e8c3cd73a345521cb7e69aa257cd3d/height=288;version=1;width=512/https%3A%2F%2Fwww.sitepoint.com%2Fwp-content%2Fthemes%2Fsitepoint%2Fassets%2Fimages%2Ficon.ruby.png)