I would like to know if it's possible to define iterators like each for a
class you have written ?
Is it also possible to write methods that can have the following
behavior/usage:

object.method do |var|
  # something
end