Struct (Ruby)

Struct is a built-in Ruby class that quickly generates a simple class with named attributes, accessors, equality, and a constructor — ideal for lightweight…