Stephane Wirtel wrote:
> if $0 == __FILE__
>   puts "This is the main function"
> else
>   puts "This is a module"
> end
>
> Is it right ?

Yes, that is a very common idiom used by many Ruby programmers to
determine if the code is being included or 'run' by itself. Good job
figuring it out. :)