The Power of Ruby Structs
22-Feb-2019 1779
I invite you to explore beyond ActiveRecord models and into the world of PORO (Plain Old Ruby Objects). These are the building block of any Object Oriented Language and especially Ruby. I’m going to focus on Value Objects, which holders of some collection of data or attributes. The collection could model a person, an account, an address, or more abstractly an error, and many more. You should keep in mind as a general principle that these objects should have a well-defined purpose or identity and contain no more information than what is needed.
The Power of Ruby Structs #ruby #rubydeveloper #rubyonrails #Power #Structs https://www.rubyonrails.ba/link/the-power-of-ruby-structs