Instance (OO)

Edit this Page

An instance is used to describe a variable or value created from a class.

Instances may use any instance methods or instance variables their class provided.

Here the variable so_many_his is an instance of the Array class:

so_many_his = Array.new(10, "hi!")
puts so_many_his.class