Adding to the $: variable
-
I am finding the following code very convenient:
$;.push(some_sub_folder_in_plugins_that_contains_other_ruby_files)Then I can use the require command for any ruby files that are in my subfolder:
require 'some_file_in_subfolder' require 'some_other_file_in_subfolder' etc.Are they any reasons why I shouldn't add directories to the $: variable?
-
hm... that's an interesting question. That snippet looks very useful. Something SKX could use.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better π
Register LoginAdvertisement