Most Ruby code uses a hash as a simple data structure. It's not as efficient as something like that, and there are no field definitions in these hashes, but they are passed in the same way as a structure in C or simple classes like this in Java. You can, of course, just make your own class as follows:
class MyStruct
attr_accessor :something, :something_else
end
But Ruby also has a Struct class that you can use. You do not see this much, though.
Customer = Struct.new('Customer', :name, :email)
c = Customer.new
c.name = 'David Lightman'
c.email = 'pwned@wopr.mil'
OpenStruct.
require 'ostruct'
c = OpenStruct.new
c.name = 'David Lightman'
c.greeting = 'How about a nice game of chess?'
.