Created
April 20, 2014 16:28
-
-
Save zakuroishikuro/11118281 to your computer and use it in GitHub Desktop.
実行しているスクリプトが保存されているフォルダのパスを取得する
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File.expand_path(File.dirname(__FILE__)) | |
# スクリプトのパスからの相対パスを使いたいとき | |
# "./foo.rb"みたいにするとカレントフォルダによって変わってしまうので |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment