Class: PicasaDownloader::PhotoHelper

Inherits:
Object
  • Object
show all
Defined in:
lib/picasa-downloader/photo_helper.rb

Class Method Summary collapse

Class Method Details

.median_year(photos) ⇒ Object



3
4
5
6
# File 'lib/picasa-downloader/photo_helper.rb', line 3

def self.median_year(photos)
  years = photos.map { |photo| photo.created_date.year }
  median = years[years.length / 2]
end