From: Stephen Duncan Jr Date: 2008-10-23T00:41:15+09:00 Subject: Re: What is Ruby equivalent of Python's ' if __name__ == "__main__" ' ------=_Part_25568_25395130.1224690167603 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline On Wed, Oct 22, 2008 at 11:32 AM, Kenneth McDonald < kenneth.m.mcdonald@sbcglobal.net> wrote: > In Python, I can use the test indicated in the subject line to determine if > a file is being executed directly, as opposed to being loaded indirectly as > the result of the execution of another file. I haven't been able to find the > Ruby equivalent of this, and would be most grateful is someone could point > me in the right direction. > > Thanks, > Ken McDonald > if $PROGRAM_NAME == __FILE__ -- Stephen Duncan Jr www.stephenduncanjr.com ------=_Part_25568_25395130.1224690167603--