Skip to content

Instantly share code, notes, and snippets.

@AndrewVos
Created February 8, 2012 14:27
Show Gist options
  • Save AndrewVos/1769967 to your computer and use it in GitHub Desktop.
Save AndrewVos/1769967 to your computer and use it in GitHub Desktop.
require "httparty"
class Songs
def self.all
@songs ||= download_songs
Process.fork do
@songs = download_songs
end
@songs
end
private
def self.download_songs
@songs = eval(HTTParty.get("https://raw.github.com/AndrewVos/fuckingawesomesongs.com/master/songs").body)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment