Skip to content

Instantly share code, notes, and snippets.

@morganp
Created March 23, 2010 14:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save morganp/341255 to your computer and use it in GitHub Desktop.
Save morganp/341255 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
#A way of including local functions in sub folders
path = File.expand_path $0
path = File.dirname(path)
require "#{path}/SubDir/function_1.rb"
require "#{path}/SubDir/function_2.rb"
require "#{path}/SubDir/function_3.rb"
#Or change working dir of script
Dir.chdir(path)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment