A Ruby Struct allows an instance to be generated with a set of accessors:
# Create a structure named by its constant Customer = Struct.new(:name, :address) #
It's mainly performance. Struct is much faster, by order of magnitudes. And consumes less memory when compared to Hash or OpenStruct. More info here: When should I use Struct vs. OpenStruct?