Skip to content

Instantly share code, notes, and snippets.

@loganhasson
Created July 21, 2014 19:28
Show Gist options
  • Save loganhasson/324bd63951f028733abd to your computer and use it in GitHub Desktop.
Save loganhasson/324bd63951f028733abd to your computer and use it in GitHub Desktop.
class FileFinder
def self.location_to_dir(dir_name)
new.location_to_dir(dir_name)
end
def location_to_dir(dir_name)
File.join(File.dirname(File.expand_path(__FILE__)), "#{dir_name}")
end
def self.location_to_file(file_name)
new.location_to_file(file_name)
end
def location_to_file(file_name)
File.join(File.dirname(File.expand_path(__FILE__)))
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment