This is the code discussed in class, minus the images. You can check the final result online at Forge, where we've uploaded it:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Thread count control | |
MAXTHREADS = 30 | |
# This is the collection of data you need to process with threads | |
collection = [] | |
# A nice array to store your thread objects | |
threads = [] | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'flickr_fu' | |
require 'httparty' | |
require 'pry' | |
DIR = "./photos" | |
MAXTHREADS = 30 | |
# Prepare the downloadin' | |
`mkdir -p #{DIR}` |
OlderNewer