Occasionally we come across objects where we don’t care about their identity. All that matters, as far as equivalence is concerned, is their state, otherwise known as their value. There is a pattern name for objects like this: Value Objects.
Join guest chef Tom Dalling to see how Value Objects can function as contracts, documenting expectations at the integration points of our code. Along the way, learn how to use …
Have you ever seen the terms "value" and "identity" thrown around and felt like you sort of get it? Join guest chef Arne Brasseur for a deep dive into exactly what …
Use an obscure feature of Ruby integers to efficiently store large matrices of boolean data.
Freezing a Ruby object can leave you skating on thin ice. Learn how to render complex Ruby objects totally immutable.
Quick, easy, minimal immutable Value Objects in Ruby
As our series on representing physical quantities draws to a close, we turn our attention to existing libraries, specifically the Unitwise gem.
It's often desirable compare objects to see which is "lesser" or "greater"; but not all objects are inherently comparable. Today we'll look at a scheme for easily imposing an arbitrary …
We know that Value Objects are useful; today we'll meet a gem that makes them easier to build.
Where do we draw the line between objects differntiated only by state, and objects differentiated by their class? That's the question we'll examine in this episode.
Today we learn about Ruby gem that makes it easier to build immutable value objects.