From: Gary Wright Date: 2008-04-23T11:48:48+09:00 Subject: Re: Ruby and object paradigm On Apr 22, 2008, at 10:35 PM, Andres wrote: > Hi ruby list, > > Iīm a smalltalk developer and now i'm beginning with Ruby. I found > words like "puts" on the ruby syntax that i donīt understand. > > The basic object paradigm formula is "receiver + message", an emisor > send a message to a receiver. > > Is puts a message? if the answer is true, then what is the receiver? > and when is "puts" implemented? if the answer is false, then What is > "puts"? puts is a message self is the receiver If you look at the inheritance structure you'll find the class 'Object' at the top. So any instance method of Object can be called via the implicit use of 'self' as the receiver. The method 'puts' is actually defined in the module Kernel and Kernel is included as a mixin to Object so that instance methods defined in Kernel are available to all objects via the inheritance/method lookup rules. Gary Wright