Last Updated: February 25, 2016
·
927
· sheerun

Check if interpreted ruby script is being required or not

if $0 == __FILE__
  # File is executed directly
else
  # File is required
end