Structures (records)

Point  = Struct.new(:x, :y) do
    def initialize(x, y)
        self.x = x
        self.y = y
    end
end

p1 = Point.new(12)
# p1.x is 1 and p1.y is 2
puts "p1 is (#{p1.x}#{p1.y})"

# p2 = Point.new # <-Error