A gem for making value classes, with lightweight validation and coercion.

A gem for making value classes.Generates modules that provide conventional value semantics for a given set of attributes. The behaviour is similar to an immutable Struct class, plus extensible, lightweight validation and coercion.These are intended for internal use, as opposed to validating user input like ActiveRecord. Invalid or missing attributes cause an exception for developers, not an error message intended for application users.
A gem for making value classes, with lightweight validation and coercion. #ruby #rubydeveloper #rubyonrails #classes, #gem https://rubyonrails.ba/single/a-gem-for-making-value-classes-with-lightweight-validation-and-coercion

Nezir Zahirovic

Contractor Ruby On Rails (8+ years) / MCPD .Net / C# / Asp.Net / CSS / SQL / (11 years)

related articles