Object-oriented programming

Object Oriented Programming or OOP is an object-oriented approach to program design employed by languages such as Ruby and Objective-C.

Data (instance variables) and code (methods) for operating on that data are bundled together in objects. The actual definition of what these instance variables and methods are is found in a class.

For example, we might have a String class. The class defines storage for the data (the characters that make up the string) and methods for working with that data (as an example, a method to return the length of the string). You instantiate an instance of the class to produce an actual String object.

Both Ruby and Objective-C have a message-based notion of object orientation. That means that calling a method on an object is conceptualized as "sending a message" to the object.