Run a Ruby library from the command-line

前端 未结 3 533
小蘑菇
小蘑菇 2020-12-29 08:00

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

3条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-29 08:54

    You can find a similar functionality in ruby.

    __FILE__ the current source file name.

    $0 Contains the name of the script being executed. May be assignable.

    source: Ruby Quick Ref

提交回复
热议问题