I\'ve just learned the basics of Ruby after being very happy with Python for several years (I\'m still using Python for some things), but I\'d like to know if there\'s an id
You want to use:
if __FILE__ == $0 # do stuff end
__FILE__ is the source file name and $0 is the name of the script currently being executed.
__FILE__
$0