Functions by themselves aren't always enough to keep your program organized. Object-oriented programming was developed to keep related data (attributes) and functions that work on that data (methods) together.
In Ruby, a new object is defined with the class keyword, followed by the name of your object (typically CamelCased). You finish the object definition later on with an end.
Most objects define a special method, initialize, that saves the initial data your object is created with (here, a radius) and performs any other required set-up.
You create an instance of your object with the new method. Arguments passed in to new are sent to your initialize method.
Data is stored on your object using instance variables that start with an @ sign. Instance variables behave like normal variables, but are only visible from inside a specific instance of your object. If you want the data to be externally accessible, you have to write more methods.