Ruby/File Directory/directory list

Материал из Wiki.crossplatform.ru

Перейти к: навигация, поиск

If you want to add extra directories to this $:

$:.push "/your/directory/here"
require "yourfile"



Ruby stores the list of directories to search for included files in a special variable called $:

# You can see what $: contains by default, using irb:
$:.each { |d| puts d }