Skip to content

Instantly share code, notes, and snippets.

/ruby.rb Secret

Created March 1, 2018 12:00
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 anonymous/21a72e5bfcbbdaa604eeeabf584dcdda to your computer and use it in GitHub Desktop.
Save anonymous/21a72e5bfcbbdaa604eeeabf584dcdda to your computer and use it in GitHub Desktop.
def all
Dir.chdir(Project_dir) do
Dir.glob('*').select { |f| File.directory? f }.each do |project|
def title
self
end
def url
"/project/#{self}"
end
end
end
end
all.each do |project|
puts "#{project.title} #{project.url}"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment